srcu: Yet more detail for srcu_readers_active_idx_check() comments
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 14 Dec 2022 18:50:30 +0000 (10:50 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 4 Jan 2023 01:49:23 +0000 (17:49 -0800)
commit0cd4b50b12d96d668b0627c149b19b5784ad4898
tree72d4b166f20f5c11a49f54dce9fcf83023f66143
parent1bafbfb3e1a18af7f404977ed0d218dc4f176f8e
srcu: Yet more detail for srcu_readers_active_idx_check() comments

The comment in srcu_readers_active_idx_check() following the smp_mb()
is out of date, hailing from a simpler time when preemption was disabled
across the bulk of __srcu_read_lock().  The fact that preemption was
disabled meant that the number of tasks that had fetched the old index
but not yet incremented counters was limited by the number of CPUs.

In our more complex modern times, the number of CPUs is no longer a limit.
This commit therefore updates this comment, additionally giving more
memory-ordering detail.

[ paulmck: Apply Nt->Nc feedback from Joel Fernandes. ]

Reported-by: Boqun Feng <boqun.feng@gmail.com>
Reported-by: Frederic Weisbecker <frederic@kernel.org>
Reported-by: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Reported-by: Neeraj Upadhyay <neeraj.iitr10@gmail.com>
Reported-by: Uladzislau Rezki <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/srcutree.c