On Fri, 10 Jul 2020 15:38:38 +0200
Peter Zijlstra <[email protected]> wrote:

> From: Josh Poimboeuf <[email protected]>
> 
> 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/[email protected]
> 
> 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 <[email protected]>
> Signed-off-by: Peter Zijlstra (Intel) <[email protected]>

Reviewed-by: Steven Rostedt (VMware) <[email protected]>

-- Steve


> ---
>  arch/Kconfig                      |    4 
>  include/asm-generic/vmlinux.lds.h |    7 
>  include/linux/module.h            |    5 
>  include/linux/static_call.h       |   36 ++++
>  include/linux/static_call_types.h |   13 +
>  kernel/Makefile                   |    1 
>  kernel/module.c                   |    5 
>  kernel/static_call.c              |  303 
> ++++++++++++++++++++++++++++++++++++++
>  8 files changed, 373 insertions(+), 1 deletion(-)
>  create mode 100644 kernel/static_call.c

Reply via email to