From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796416182; b=RpOoL60vcI6RdaSDzIcqNSvoIewj76Juqd96cFHjZGTKe0d4EZaaaY+OmnWn+V76NvOZ 4z0HvlZNM1SkBR+kRkBKJaefZ4IINM1mG0BBEw/2JmxlqryVxbhGLzFKx9FOCsai6L9Hh +NqUnoAtwDgi95hEPjb+u4mYr+BXBBeTd2wnVUypjHl0BHUPR5RMsScxVmGlORLSaO4jM FQem12sHstxoQx42a8W6P5P0WrtH0wCPET+sDaUA8fQiYZCze1z0qHeLlobXYAUiS1vBw ZbkPjtINi+ckIpc+Y9EaJGJHWGLAbjzx0n9zjW6S3DG48MCvthu/So1iSx+Hi8sO7pw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796416182; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-Id: In-Reply-To:References:X-Mailer:Mime-Version:Content-Type: Content-Transfer-Encoding; bh=CIgB3FujZFiVmVXuWRAsNamq0p+rWsVWRuFo8siBc50=; b=ajmTZKWdsgF56fJ/jhBZT0DHAWP8BelkQwbCzqT8RoPxsMOs4nqwnZeIVOGhXYNh2m6A UUVNjbEvnKYhn38xAgBwsyMKhtOrvPEUDITEmQBrVeN5vKIYPzcrEna/MZkJNf/H6Q6vE 7M/0nVrWdkzNQQtmhdddI9dhptIW5/hjHmfVwoiT207HmB0ozfCXSJRGIRFUs7SxTeQ5F KVnhEIzRLoc8dUhTOVz/hz096eCEDPIsWHEOc10lhxlrs8tyyDSGkXtZWhoiSMDN7Uvqf hxCrPDzeMbv1X/ywlvCxDaDSA6SHbz4fES+uI3ioPVGmGam5zhx+3i86b0Do/CpcSUQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=jkXLRsxR; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14EE5606A322 for ; Fri, 4 Dec 2026 20:29:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=jkXLRsxR Received: by smtp.kernel.org (Postfix) with ESMTPSA id 251001F00936; Fri, 4 Dec 2026 20:29:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796416181; bh=CIgB3FujZFiVmVXuWRAsNamq0p+rWsVWRuFo8siBc50=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=jkXLRsxRmc8dfTXqdEWNWsq7SqX9uQ9Epsog9IkkK0M8oIQZH0a0tMXu2B9l5zcQU SlbwayyDiRqxwnXGXpk/JgfZXU904tOMuOK8cMOFgvKCyzQCR2vRwmD/oJkqZ3sdja x1FDXvXhoFagNGeDTOaAR7mw288h5QE98w7o0jeE= Date: Fri, 4 Dec 2026 12:29:40 -0800 From: Andrew Morton To: jim.cromie@gmail.com Cc: Jim Cromie via B4 Relay , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , Jason Baron , Alice Ryhl , Steven Rostedt , Ard Biesheuvel , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/5] jump_label, x86, dyndbg: Batch multi-key static branch updates Message-Id: <20261204122940.e702b97c014bd654126718b4@linux-foundation.org> In-Reply-To: <20261204-jump-batch-261128-v3-0-2adda55a5d71@gmail.com> References: <20261204-jump-batch-261128-v3-0-2adda55a5d71@gmail.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 04 Dec 2026 11:27:51 -0700 Jim Cromie via B4 Relay 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@gmail.com