Re: [PATCH v2 0/7] srcu: NMI-safe atomic SRCU readers, and their irqsave forms

From: Mathieu Desnoyers

Date: Wed Nov 11 2026 - 14:43:02 EST


On 2026-11-11 14:02, David Woodhouse wrote:
The latter claim is only true in __srcu_read_lock_fast()/_fast_updown()
isn't it? Not in the atomic-SRCU. Unless we do something like this on
top?

It is true for the atomic readers as well. Without
CONFIG_NEED_SRCU_NMI_SAFE, include/linux/srcu.h defines
__srcu_read_lock_nmisafe() as an inline that calls __srcu_read_lock(),
and the same for unlock. So x86 keeps this_cpu_inc() and smp_mb().
Your diff selects the same functions by hand.

Only the architectures that select NEED_SRCU_NMI_SAFE get the atomic
increments.

I set a test running (*without* the above).

Thanks!

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com