]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
srcu: Document srcu_flip() memory-barrier D relation to SRCU-fast
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 22 Jul 2025 21:57:33 +0000 (14:57 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 15 Sep 2025 12:16:28 +0000 (05:16 -0700)
commit1c77e862b81e8fe84d3a908271c72da9711ea801
treef5a0c6d2705bf3ce3396e99557efaf68e268ecf9
parentbe975448a45cd024e2b98598eefc0e164ad93f09
srcu: Document srcu_flip() memory-barrier D relation to SRCU-fast

The smp_mb() memory barrier at the end of srcu_flip() has a comment,
but that comment does not make it clear that this memory barrier is an
optimization, as opposed to being needed for correctness.  This commit
therefore adds this information and points out that it is omitted
for SRCU-fast, where a much heavier weight synchronize_srcu() would
be required.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: <bpf@vger.kernel.org>
kernel/rcu/srcutree.c