WSL2-Linux-Kernel/Documentation/RCU
Paul E. McKenney e4453d8a1c rcu: Make rcu_read_unlock_special() safe for rq/pi locks
The scheduler is currently required to hold rq/pi locks across the entire
RCU read-side critical section or not at all.  This is inconvenient and
leaves traps for the unwary, including the author of this commit.

But now that excessively long grace periods enable scheduling-clock
interrupts for holdout nohz_full CPUs, the nohz_full rescue logic in
rcu_read_unlock_special() can be dispensed with.  In other words, the
rcu_read_unlock_special() function can refrain from doing wakeups unless
such wakeups are guaranteed safe.

This commit therefore avoids unsafe wakeups, freeing the scheduler to
hold rq/pi locks across rcu_read_unlock() even if the corresponding RCU
read-side critical section might have been preempted.  This commit also
updates RCU's requirements documentation.

This commit is inspired by a patch from Lai Jiangshan:
https://lore.kernel.org/lkml/20191102124559.1135-2-laijs@linux.alibaba.com
This commit is further intended to be a step towards his goal of permitting
the inlining of RCU-preempt's rcu_read_lock() and rcu_read_unlock().

Cc: Lai Jiangshan <laijs@linux.alibaba.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2020-04-27 11:03:50 -07:00
..
Design rcu: Make rcu_read_unlock_special() safe for rq/pi locks 2020-04-27 11:03:50 -07:00
NMI-RCU.rst doc: Converted NMI-RCU.txt to NMI-RCU.rst. 2019-12-10 18:51:52 -08:00
RTFP.txt Documentation: fix common spelling mistakes 2016-04-28 07:51:59 -06:00
UP.rst doc: RCU callback locks need only _bh, not necessarily _irq 2019-06-28 09:10:40 -06:00
arrayRCU.rst doc: Convert arrayRCU.txt to arrayRCU.rst 2019-12-10 18:51:19 -08:00
checklist.txt doc: Fix typos and otherwise modernize checklist.txt 2019-03-26 14:37:06 -07:00
index.rst doc: Convert to rcubarrier.txt to ReST 2019-12-10 18:51:53 -08:00
listRCU.rst doc/RCU/listRCU: Update example function name 2020-02-27 07:03:13 -08:00
lockdep-splat.txt doc: Fix typo "deference" to "dereference" 2019-12-10 18:51:54 -08:00
lockdep.txt doc: Update list_for_each_entry_rcu() documentation 2019-10-29 02:48:28 -07:00
rcu.rst doc/RCU/rcu: Use https instead of http if possible 2020-02-27 07:03:13 -08:00
rcu_dereference.rst doc: Convert to rcu_dereference.txt to rcu_dereference.rst 2019-12-10 18:51:53 -08:00
rcubarrier.rst doc: Convert to rcubarrier.txt to ReST 2019-12-10 18:51:53 -08:00
rculist_nulls.txt docs: fix broken doc references due to renames 2019-07-17 06:57:51 -03:00
rcuref.txt doc/rcuref: Document real world examples in kernel 2019-05-28 09:02:16 -07:00
stallwarn.txt rcu: Remove kfree_rcu() special casing and lazy-callback handling 2020-01-24 10:24:31 -08:00
torture.txt doc: Add rcutorture scripting to torture.txt 2020-02-27 07:03:14 -08:00
whatisRCU.rst doc: Updated full list of RCU API in whatisRCU.rst 2019-12-10 18:51:54 -08:00