]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fgraph: Give ret_stack its own kmem cache
authorSteven Rostedt <rostedt@goodmis.org>
Sat, 26 Oct 2024 10:32:10 +0000 (06:32 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 29 Oct 2024 11:43:02 +0000 (07:43 -0400)
commit434098485bfc8f5336d5164adea0a9d102a0a09a
treea0e464d91e60f5566a255dc9ceff07d05e325bad
parent6ea8b69da6bf1b8a0e4683f37a006a2e2f4fc943
fgraph: Give ret_stack its own kmem cache

The ret_stack (shadow stack used by function graph infrastructure) is
created for every task on the system when function graph is enabled. Give
it its own kmem_cache. This will make it easier to see how much memory is
being used specifically for function graph shadow stacks.

In the future, this size may change and may not be a power of two. Having
its own cache can also keep it from fragmenting memory.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Link: https://lore.kernel.org/20241026063210.7d4910a7@rorschach.local.home
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/fgraph.c