summaryrefslogtreecommitdiff
path: root/kernel/module.c
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2020-08-18 15:57:41 +0200
committerIngo Molnar <mingo@kernel.org>2020-09-01 09:58:04 +0200
commit115284d89a436e9b66da0c6c4f6efded806874b2 (patch)
tree32a7cea5ea8b3669e7ba38532c3e229cb13331c6 /kernel/module.c
parent563a02b0c9704f69c0364befedd451f57fe88092 (diff)
static_call: Add basic static call infrastructure
Static calls are a replacement for global function pointers. They use code patching to allow direct calls to be used instead of indirect calls. They give the flexibility of function pointers, but with improved performance. This is especially important for cases where retpolines would otherwise be used, as retpolines can significantly impact performance. The concept and code are an extension of previous work done by Ard Biesheuvel and Steven Rostedt: https://lkml.kernel.org/r/20181005081333.15018-1-ard.biesheuvel@linaro.org https://lkml.kernel.org/r/20181006015110.653946300@goodmis.org There are two implementations, depending on arch support: 1) out-of-line: patched trampolines (CONFIG_HAVE_STATIC_CALL) 2) basic function pointers For more details, see the comments in include/linux/static_call.h. [peterz: simplified interface] 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.623259796@infradead.org
Diffstat (limited to 'kernel/module.c')
0 files changed, 0 insertions, 0 deletions