lkml.org 
[lkml]   [2020]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 07/17] static_call: Add inline static call infrastructure
On Fri, 10 Jul 2020 15:38:38 +0200
Peter Zijlstra <peterz@infradead.org> wrote:

> From: Josh Poimboeuf <jpoimboe@redhat.com>
>
> 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>

Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- 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

\
 
 \ /
  Last update: 2020-07-10 23:58    [W:0.167 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site