Re: [PATCH v3 0/5] jump_label, x86, dyndbg: Batch multi-key static branch updates

From: Andrew Morton

Date: Fri Dec 04 2026 - 15:29:45 EST


On Fri, 04 Dec 2026 11:27:51 -0700 Jim Cromie via B4 Relay <devnull+jim.cromie.gmail.com@xxxxxxxxxx> wrote:

> Toggling many boolean static keys at once -- such as enabling or
> disabling pr_debug() sites across vmlinux and loaded modules --
> currently patches one static key at a time. Each toggle sends a full
> set of cross-CPU text-poke IPIs (~39.7k CAL IPIs to flip 1,885 active
> builtin keys across 8 CPUs on x86). Even if kernel/jump_label.c defers
> arch_jump_label_transform_apply() across a batch of static-keys, x86's
> smp_text_poke_batch_add() flushes whenever a poke address arrives below
> the tail entry (~2 entries per batch in dyndbg descriptor order) and
> hides its 256-entry flush boundaries from jump_label.c.
>
> This series updates all three layers so a static_key_batch guard
> transparently batches static_key_{enable,disable,slow_inc,slow_dec}()
> calls while handling out-of-order poke addresses and same-batch state
> reversals cleanly:
>
> ...
>
> Measured on an 8-vCPU x86_64 guest (v7.4-rc5, 1,997 builtin pr_debug
> descriptors / 1,885 non-init keys / 1,964 jump sites,
> CONFIG_PROVE_LOCKING=y):
>
> Workload master v3 (5 patches) Speedup
> -------------------------------------------------------------------
> echo "+p" > control 39,712 282 CAL 141x
> echo "-p" > control 39,674 255 CAL 156x
> "+p ; -p" (1x) 79,256 424 CAL 187x
> "+p ; -p" (4x) 316,773 756 CAL 419x
>
> Bare-metal desktops (vmlinux + loaded modules incl. amdgpu):
>
> Host / CPUs / Sites "module amdgpu +p" "+p ; -p" (4x)
> ----------------------------------------------------------------
> Ryzen 9 6900HX, 16c, 8,484 615 CAL 12,524 CAL
> Ryzen 9 3900X, 24c, 8,197 909 CAL 18,243 CAL

Jim, is 491x the best you can do? c'mon, man...

What I'm not finding in here is the actual user-visible effect. How
much user-visible wall time are we talking about here? When they
do what??

(And this info should be in the first paragraph of the [0/N]! When
busy maintainers&reviewers look at a thing, their uppermost question is
"why should I care". Tell them!)

Sashiko said a bunch of stuff, fwtw:
https://sashiko.dev/#/patchset/20261204-jump-batch-261128-v3-0-2adda55a5d71@xxxxxxxxx