From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=90.155.92.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796426849; b=uFVGPWYWG3SK4aGHnWWodvSqYjKtlYc/56gs/ho/Is5tNrMBIfVCmGkwYFTMJ3nl0UQM kxGQDIharT4iD8bD4aaE6xeWtCuC7rfwZfrwKbEIpLLyqbVv7vWheQ4dMII4Nv59+bS59 JY6uShvS3zSYSlbu5mWPNGEtK+QUhF9HA/WHR+moJcyPclBnbePDKnu9eZFe6Sw8D0bZI VcKlwK4mqUIBMhgxaEt1GfjBH91+Hmi6r+qNNGqUSMQbE0WepGKlRsTewm2RxJfEz0pqp 2Jii2QlKBc2dxv/sMuihYoNkDTPxvoQwT9Jg7pqnsJ3oRW1HvdGFF7CWGGAzfYGGRAQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796426849; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=ru2DvpvQLWbdPHNVRD23rYPLxzfq6SRrq41k0pfTp9Y=; b=Cp6nk14PGH3+WXQtVqzF+Gk+PQovBiHyZGBQkz3AWzkHmdZB10c1riF0hBvO7dRJX+CQ 52pTAhMncQZLQ2Dcp3vjU4PoIFfGA0DvdUSQf5d9WB3KMlgpbUgogU7ncg6SomSCHQudj qx15Q5+LArRh+2CfTsyjpzsw2vgtHJxqhCmbU39WIw7OmcTNN35XDdfUsXClzhJ/x1Caf L2Wpm6DxFS1pW8Uvv63gaYHarD7ME0Du/vC/rSRznmAhDYcwhx75PA0g7asFgrnbc2kEX RpeBFFnd+bI8N5L2u5T98FWaFPCdYBQtAK05QpdxsIvRhQqeUZHHVWGKp6YZeqeyBQA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=BXhO9WU7; arc=none smtp.remote-ip=90.155.92.199 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75BAF606A322 for ; Fri, 4 Dec 2026 23:27:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 75BAF606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=BXhO9WU7 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ru2DvpvQLWbdPHNVRD23rYPLxzfq6SRrq41k0pfTp9Y=; b=BXhO9WU71j9dTHzq5+Jb63IZIO hyUuowtxpAG5ubcwE6E6saGJRNQAr2yBBv/iqle5kXEdLbjTO7s1OYib4COR4IHV9OzOGiBIp0odz WgvLm2YiF+kxXtNntG2oZeyLv5qE8V8/RZ3Cwcr2fabbFEjh19zURYVf/p21UHNI4AM9TqxWNog15 9XqJ9+W5ylphCT2usUXdA3rzkhUmEqONj7lg3tw8Uth6oi7a2OH0PB0x1fh0lEHZce1Ow55JBIS1P r/d7rkE3sO98I+f3trvi31szcLEpDMSchJS43HR0dXqzQRvnqdq/4kaAoXeu2D/AYdEMlWYzasgro LRhJ+isA==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZcgS-0000000EsXV-1dS8; Fri, 04 Dec 2026 23:27:20 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id AA67E3003DE; Sat, 05 Dec 2026 00:27:18 +0100 (CET) Date: Sat, 5 Dec 2026 00:27:18 +0100 From: Peter Zijlstra To: jim.cromie@gmail.com Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Josh Poimboeuf , Jason Baron , Alice Ryhl , Steven Rostedt , Ard Biesheuvel , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/7] jump_label: Add batching API for queued static key updates Message-ID: <20261204232718.GO2883950@noisy.programming.kicks-ass.net> References: <20261129-jump-batch-261128-v2-0-b1829d2429f0@gmail.com> <20261129-jump-batch-261128-v2-4-b1829d2429f0@gmail.com> <20261130115509.GL2668804@noisy.programming.kicks-ass.net> 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-Disposition: inline In-Reply-To: On Fri, Dec 04, 2026 at 12:18:30PM -0700, jim.cromie@gmail.com wrote: > Yes, that worked well -- I just posted v3 built around your > batch_owner / static_key_batch guard design, dropping the @apply > plumbing, *_queued() helpers, and STATIC_KEY_TRANS_DISABLE (-2). > > A few edge cases came up while wiring it up and testing with lockdep: > > 1. Added batch_depth and a batch_owner == current fastpath before > cpus_read_lock() so nested batch guards and _cpuslocked() wrappers > don't self-deadlock or drop the outer batch early. Urgh, that gets us firmly in recursive locking territory -- and that has proven to be a painful place time and time again. What sites actually 'need' this; and can't we fix that differently? > 2. Moved key queueing to jump_label_queue_key() (handling 0-site keys) > with jump_label_flush_key() on revisits (e.g. "+p;-p"), plus > static_key_disable() falling through on -1 onto jump_label_mutex. Its not immediately clear what you mean here; did you force a flush when a second operation on a previously queued key arrives?