[PATCH v6 01/14] rcu-tasks-trace: Let TASKS_TRACE_RCU_NO_MB default on without RCU_EXPERT

Paul E. McKenney paulmck at kernel.org
Tue Oct 6 11:34:32 PDT 2026


On Tue, Sep 29, 2026 at 05:07:18PM +0000, Josef Bacik wrote:
> 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.
> 
> Assisted-by: LLM
> Signed-off-by: Josef Bacik <josef at toxicpanda.com>

Reviewed-by: Paul E. McKenney <paulmck at kernel.org>

> ---
>  kernel/rcu/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/rcu/Kconfig b/kernel/rcu/Kconfig
> index 332df7a7a634..e3cfe1fe5592 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
> 
> -- 
> 2.55.0
> 



More information about the linux-arm-kernel mailing list