-
- Downloads
static_call: Add inline static call infrastructure
Add infrastructure for an arch-specific CONFIG_HAVE_STATIC_CALL_INLINE option, which is a faster version of CONFIG_HAVE_STATIC_CALL. At runtime, the static call sites are patched directly, rather than using the out-of-line trampolines. Compared to out-of-line static calls, the performance benefits are more modest, but still measurable. Steven Rostedt did some tracepoint measurements: https://lkml.kernel.org/r/20181126155405.72b4f718@gandalf.local.home This code is heavily inspired by the jump label code (aka "static jumps"), as some of the concepts are very similar. For more details, see the comments in include/linux/static_call.h. [peterz: simplified interface; merged trampolines] Signed-off-by:Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by:
Ingo Molnar <mingo@kernel.org> Reviewed-by:
Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20200818135804.684334440@infradead.org
Showing
- arch/Kconfig 4 additions, 0 deletionsarch/Kconfig
- include/asm-generic/vmlinux.lds.h 7 additions, 0 deletionsinclude/asm-generic/vmlinux.lds.h
- include/linux/module.h 5 additions, 0 deletionsinclude/linux/module.h
- include/linux/static_call.h 35 additions, 1 deletioninclude/linux/static_call.h
- include/linux/static_call_types.h 13 additions, 0 deletionsinclude/linux/static_call_types.h
- kernel/Makefile 1 addition, 0 deletionskernel/Makefile
- kernel/module.c 5 additions, 0 deletionskernel/module.c
- kernel/static_call.c 303 additions, 0 deletionskernel/static_call.c
Loading
Please register or sign in to comment