Re: [PATCH v2 0/7] srcu: NMI-safe atomic SRCU readers, and their irqsave forms
From: Mathieu Desnoyers
Date: Wed Nov 11 2026 - 14:45:05 EST
On 2026-11-11 14:37, David Woodhouse wrote:
On Wed, 2026-11-11 at 14:33 -0500, Mathieu Desnoyers wrote:
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.
You are lost in a twisty maze of helper functions, all alike...
I guess I had the best mentor in that regard! ;-)
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com