Skip to content

Add static_call

Peter Zijlstra lkml 6 versions – Applied

Status from this message: The following commit has been merged into the core/static_call branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest18 patches 4 repliesApplied
  2. v617 patches 29 repliesSuperseded
  3. v517 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v418 patches40 repliesSuperseded
v317 patches33 repliesSuperseded
v213 patches2 repliesSuperseded

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/18notifier: Fix broken error handling patterninclude/linux/notifier.h kernel/cpu_pm.c kernel/notifier.c +6 more+147 -1400 replies
2/18module: Fix up module_notifier return valuesdrivers/oprofile/buffer_sync.c kernel/trace/bpf_trace.c kernel/trace/trace.c +3 more+13 -90 replies
3/18module: Properly propagate MODULE_STATE_COMING failurekernel/module.c+7 -30 replies
4/18jump_label,module: Fix module lifetime for __jump_label_mod_text_reservedkernel/jump_label.c+8 -20 replies
5/18compiler.h: Make __ADDRESSABLE() symbol truly uniqueinclude/linux/compiler.h+1 -10 replies
6/18static_call: Add basic static call infrastructurearch/Kconfig include/linux/static_call.h include/linux/static_call_types.h+174 -00 replies
7/18static_call: Add inline static call infrastructurearch/Kconfig include/asm-generic/vmlinux.lds.h include/linux/module.h +5 more+373 -10 replies
8/18static_call: Avoid kprobes on inline static_call()sarch/x86/kernel/kprobes/opt.c include/linux/static_call.h kernel/kprobes.c +1 more+84 -14 replies
9/18x86/static_call: Add out-of-line static call implementationarch/x86/Kconfig arch/x86/include/asm/static_call.h arch/x86/kernel/Makefile +1 more+56 -00 replies
10/18x86/static_call: Add inline static call implementation for x86-64arch/x86/Kconfig arch/x86/include/asm/static_call.h arch/x86/kernel/static_call.c +10 more+193 -90 replies
11/18static_call: Simple self-testarch/Kconfig kernel/static_call.c+49 -00 replies
12/18x86/alternatives: Teach text_poke_bp() to emulate RETarch/x86/include/asm/text-patching.h arch/x86/kernel/alternative.c+24 -00 replies
13/18static_call: Add static_call_cond()arch/x86/include/asm/static_call.h arch/x86/kernel/static_call.c include/linux/static_call.h+127 -130 replies
14/18static_call: Handle tail-callsarch/x86/kernel/static_call.c include/linux/static_call.h include/linux/static_call_types.h +3 more+60 -180 replies
15/18static_call: Add some validationarch/x86/kernel/static_call.c+26 -20 replies
16/18static_call: Allow early initarch/x86/kernel/setup.c arch/x86/kernel/static_call.c include/linux/static_call.h +1 more+85 -70 replies
17/18tracepoint: Optimize using static_call()include/linux/tracepoint-defs.h include/linux/tracepoint.h include/trace/define_trace.h +1 more+94 -360 replies
18/18x86/perf, static_call: Optimize x86_pmu methodsarch/x86/events/core.c+94 -400 replies

Reviews trailers per patch

10 of 18 patches have a Reviewed-by or Acked-by.

PatchSteven Rostedt (VMware)Ard BiesheuvelMathieu DesnoyersJoel Fernandes (Google)Robert RichterMiroslav BenesJessica YuJosh PoimboeufRafael J. WysockiMasami Hiramatsu
1/18A-b
2/18A-b R-b R-b R-b
3/18R-b A-b A-b
4/18R-b
5/18A-b
6/18R-b
7/18R-b
8/18A-b
9/18
10/18
11/18
12/18R-b
13/18
14/18
15/18Requested-by
16/18R-b
17/18
18/18

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 10 reviewers.

Read the v7 thread

Cover letter [PATCH v7 00/18] Add static_call

Hi all,

static_call(), is the idea of static_branch() applied to indirect function calls. Remove a data load (indirection) by modifying the text.

The inline implementation still relies on objtool to generate the .static_call_sites section, mostly because this is a natural place for x86_64 and works for both GCC and LLVM. Other architectures can pick other means if/when they implement the inline patching. The out-of-line (aka. trampoline) variant doesn't require this.

Patches go on top of linus' tree.

Changes since last time:

- rebased
- review feedback from Steve