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=1796154288; b=wSQVac019gt5Ib2XvS8/3DLkkxgDrHDBahCj9rRzQRI48EwQRuYR+Fx/lYVbPTJwCpwv CFymBUYMKCfoPorYwT0ON1cxCtb7KJudl5k8mAFW0yKAggm9vzFCLx+kryhhPJYLXE/xd 7cywYlinQYeIC7ZI0vxV7se9W30j4WIJjPxbLP81C5STmuwzXahK0/+1vBhLw/iM0oOXm u6irJNP0Cda+3G2PA9SP3ohXvos5373VMtq1LoBLdSYZ8bWiJ7rJCfcoH9IyjwX6hUbi2 tVlT7R6j12JCtaYxjq9FqZdsviQnMhXgpW8mM9DzXVFVsshYqyNZdWyRJkqz/wEIwFQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796154288; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=QYdt+wL2mE4pJSIVWAKVVG6O1Als+ImiKH3EYzxTQHs=; b=hdCnQgNiWJwYshm3l2yBN0nlLXULN9j48j1ajsrYfTvOCvLwqaN1lpiIjWNyDrhsSKvR wBLI2tSULS6H7oQmiM0gU7lst6ynGjbRzG14dT8h6JzS4vWVEgMD3SwXhWyJm4NcRzw8w XIXW8UXnbBAxQPTlxg2x6vVcsKuqGJ/YONeBABimiRsuWRhhGjHHO8KVLJsN1Qd9ZdMi/ sbnSIIlq+LDjisb10fkDBI95s2fSVq2cZDGmPJRAd5EC8TPI8NMxwOLG3H6erwUSVg3Ky qEbqIQIv4KbUhUoRczyl1e/FezN7qaep58y0BnnRkpfxEVaDLhPUi320Enpgk4iz99Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=K1m1KDZQ; 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 UTF8SMTPS id B69E8606A336; Tue, 1 Dec 2026 19:44:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=K1m1KDZQ Received: by smtp.kernel.org (Postfix) with UTF8SMTPSA id 22D681F00A17; Tue, 1 Dec 2026 19:44:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796154288; bh=QYdt+wL2mE4pJSIVWAKVVG6O1Als+ImiKH3EYzxTQHs=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=K1m1KDZQu3EwB7/sb3YxUbssg28Io6b+faeaH6xyxz9YyvcnNU/m+BRIgS7lr16wV S2TxmlEYogdiN8rzkrW4LX5flrHTGUc7uAjlGMO2k0ZFYE7qn0Ffo1JtG+TLaOsHtK CWM51e+b7Qnse76pjJ/BTzo5Li3C6W8SsFWX4yMx+d+R9pTm+iCM4mtGT9hRyCDii2 kYuC5IqKYj0gVhtjha7TO3jmVFYH703ZQUA83LC06xKje/hYMUq3QULkE3voV4EMTR EffudnNZojk7sgm+rxtaScbubMHJu9AOIOo6322gwtj7Rnz2WFE6VvMdji8bfSF8+Z Q7WlZ1V3rbuzQ== Date: Tue, 1 Dec 2026 14:44:47 -0500 From: Joel Fernandes To: Josef Bacik Cc: "Paul E. McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Uladzislau Rezki , Alexei Starovoitov , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Masami Hiramatsu , Mark Rutland , Peter Zijlstra , Thomas Gleixner , Daniel Borkmann , Andrii Nakryiko , Puranjay Mohan , rcu@vger.kernel.org, bpf@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rcu-tasks-trace: Let TASKS_TRACE_RCU_NO_MB default on without RCU_EXPERT Message-ID: <20261201194447.GA3277646@joelbox> References: <179614881389.4.17347597738097573591@bacik.io> X-Mailing-List: linux-trace-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: <179614881389.4.17347597738097573591@bacik.io> On 12/01, Josef Bacik wrote: > From: Josef Bacik > > TASKS_TRACE_RCU_NO_MB defaults to ARCH_WANTS_NO_INSTR, on the grounds > (see 1a72f4bb6f3e) that architectures with noinstr entry code only ever > run tracing where RCU is watching and so can dispense with the read-side > smp_mb() in rcu_read_lock_trace() and friends. But the option also > depends on RCU_EXPERT, and a Kconfig default is not applied to a symbol > whose dependencies are unmet, so on an ordinary RCU_EXPERT=n build of > such an architecture the option is simply absent and every Tasks Trace > reader pays for two full barriers that the architecture does not need. > > Keep the prompt behind RCU_EXPERT, so that overriding the default in > either direction remains an expert decision, but let the default itself > apply unconditionally. On x86-64 and arm64 defconfig this turns the > barriers off, as intended; architectures without ARCH_WANTS_NO_INSTR > are unchanged. > > Signed-off-by: Josef Bacik > Reviewed-by: Paul E. McKenney Applied for 7.5, thanks! Joel Fernandes > --- > Alexei asked for this one on its own. It hasn't changed since v6 apart > from Paul's Reviewed-by. > > v6: https://lore.kernel.org/all/20260929-b4-rcu-tasks-preempt-qs-v6-1-c111ee02caca@toxicpanda.com/ > > kernel/rcu/Kconfig | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig > index bc9483c0b5d84..7a9fe0ad0a9fe 100644 > --- a/kernel/rcu/Kconfig > +++ b/kernel/rcu/Kconfig > @@ -142,8 +142,8 @@ config TASKS_TRACE_RCU > default n > > config TASKS_TRACE_RCU_NO_MB > - bool "Override RCU Tasks Trace inclusion of read-side memory barriers" > - depends on RCU_EXPERT && TASKS_TRACE_RCU > + bool "Override RCU Tasks Trace inclusion of read-side memory barriers" if RCU_EXPERT > + depends on TASKS_TRACE_RCU > default ARCH_WANTS_NO_INSTR > help > This option prevents the use of read-side memory barriers in > > base-commit: 19cc08c1a6a650f8e54c0461ff198be6448f425d >