mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 02:46:41 +07:00
264d4f88ad
The synchronize_rcu() definition based on RW-locks in whatisRCU.txt does not meet the "Memory-Barrier Guarantees" in Requirements.html; for example, the following SB-like test: P0: P1: WRITE_ONCE(x, 1); WRITE_ONCE(y, 1); synchronize_rcu(); smp_mb(); r0 = READ_ONCE(y); r1 = READ_ONCE(x); should not be allowed to reach the state "r0 = 0 AND r1 = 0", but the current write_lock()+write_unlock() definition can not ensure this. This commit therefore inserts an smp_mb__after_spinlock() in order to cause this synchronize_rcu() implementation to provide this memory-barrier guarantee. Suggested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Lai Jiangshan <jiangshanlai@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> |
||
---|---|---|
.. | ||
Design | ||
00-INDEX | ||
arrayRCU.txt | ||
checklist.txt | ||
listRCU.txt | ||
lockdep-splat.txt | ||
lockdep.txt | ||
NMI-RCU.txt | ||
rcu_dereference.txt | ||
rcu.txt | ||
rcubarrier.txt | ||
rculist_nulls.txt | ||
rcuref.txt | ||
RTFP.txt | ||
stallwarn.txt | ||
torture.txt | ||
UP.txt | ||
whatisRCU.txt |