* [PATCH] rcu-tasks-trace: Let TASKS_TRACE_RCU_NO_MB default on without RCU_EXPERT
@ 2026-12-01 18:20 Josef Bacik
2026-12-01 19:25 ` sashiko-bot
2026-12-01 19:44 ` Joel Fernandes
0 siblings, 2 replies; 3+ messages in thread
From: Josef Bacik @ 2026-12-01 18:20 UTC (permalink / raw)
To: Paul E. McKenney, Frederic Weisbecker, Neeraj Upadhyay,
Joel Fernandes, Josh Triplett, Boqun Feng, Uladzislau Rezki,
Alexei Starovoitov
Cc: Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, Zqiang,
Masami Hiramatsu, Mark Rutland, Peter Zijlstra, Thomas Gleixner,
Daniel Borkmann, Andrii Nakryiko, Puranjay Mohan, rcu, bpf,
linux-trace-kernel, linux-arm-kernel, linux-kernel
From: Josef Bacik <josef@toxicpanda.com>
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 <josef@toxicpanda.com>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rcu-tasks-trace: Let TASKS_TRACE_RCU_NO_MB default on without RCU_EXPERT
2026-12-01 18:20 [PATCH] rcu-tasks-trace: Let TASKS_TRACE_RCU_NO_MB default on without RCU_EXPERT Josef Bacik
@ 2026-12-01 19:25 ` sashiko-bot
2026-12-01 19:44 ` Joel Fernandes
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-12-01 19:25 UTC (permalink / raw)
To: Josef Bacik; +Cc: bpf, linux-trace-kernel
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] rcu-tasks-trace: missing Fixes: trailer for
TASKS_TRACE_RCU_NO_MB default fix
--
commit d71d7e9e103039a6b076033176283fcd4cbeaded
Author: Josef Bacik <josef@toxicpanda.com>
> rcu-tasks-trace: Let TASKS_TRACE_RCU_NO_MB default on without RCU_EXPERT
>
> 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 <josef@toxicpanda.com>
> Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
[Severity: Low]
This fixes the TASKS_TRACE_RCU_NO_MB Kconfig default when RCU_EXPERT is
not enabled. Should this include:
Fixes: 1a72f4bb6f3e ("rcu: Add noinstr-fast rcu_read_{,un}lock_tasks_trace() APIs")
--
Sashiko AI review · https://sashiko.dev/#/patchset/179614881389.4.17347597738097573591@bacik.io?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] rcu-tasks-trace: Let TASKS_TRACE_RCU_NO_MB default on without RCU_EXPERT
2026-12-01 18:20 [PATCH] rcu-tasks-trace: Let TASKS_TRACE_RCU_NO_MB default on without RCU_EXPERT Josef Bacik
2026-12-01 19:25 ` sashiko-bot
@ 2026-12-01 19:44 ` Joel Fernandes
1 sibling, 0 replies; 3+ messages in thread
From: Joel Fernandes @ 2026-12-01 19:44 UTC (permalink / raw)
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, bpf, linux-trace-kernel, linux-arm-kernel,
linux-kernel
On 12/01, Josef Bacik <josef@bacik.io> wrote:
> From: Josef Bacik <josef@toxicpanda.com>
>
> 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 <josef@toxicpanda.com>
> Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-01 19:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 18:20 [PATCH] rcu-tasks-trace: Let TASKS_TRACE_RCU_NO_MB default on without RCU_EXPERT Josef Bacik
2026-12-01 19:25 ` sashiko-bot
2026-12-01 19:44 ` Joel Fernandes
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.