• Steven Rostedt (Google)'s avatar
    tracing: Allow boot instances to use reserve_mem boot memory · 29a02ec6
    Steven Rostedt (Google) authored
    Allow boot instances to use memory reserved by the reserve_mem boot
    option.
    
      reserve_mem=12M:4096:trace  trace_instance=boot_mapped@trace
    
    The above will allocate 12 megs with 4096 alignment and label it "trace".
    The second parameter will create a "boot_mapped" instance and use the
    memory reserved and labeled as "trace" as the memory for the ring buffer.
    
    That will create an instance called "boot_mapped":
    
      /sys/kernel/tracing/instances/boot_mapped
    
    Note, because the ring buffer is using a defined memory ranged, it will
    act just like a memory mapped ring buffer. It will not have a snapshot
    buffer, as it can't swap out the buffer. The snapshot files as well as any
    tracers that uses a snapshot will not be present in the boot_mapped
    instance.
    
    Also note that reserve_mem is not reliable in acquiring the same physical
    memory at each soft reboot. It is possible that KALSR could map the kernel
    at the previous boot memory location forcing the reserve_mem to return a
    different memory location. In this case, the previous ring buffer will be
    lost.
    
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Ross Zwisler <zwisler@google.com>
    Cc: Vincent Donnefort <vdonnefort@google.com>
    Link: https://lore.kernel.org/20240815082811.669f7d8c@gandalf.local.homeSigned-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
    29a02ec6
kernel-parameters.txt 271 KB