linux/Documentation/RCU
Andrea Parri 264d4f88ad doc: Update synchronize_rcu() definition in whatisRCU.txt
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>
2018-07-12 15:39:23 -07:00
..
Design doc: Update memory-ordering documentation for ->gp-seq 2018-07-12 15:38:51 -07:00
00-INDEX rcu: Remove debugfs tracing 2017-06-08 18:52:43 -07:00
arrayRCU.txt documentation: RCU-protected array indexes no longer supported 2015-05-27 12:56:17 -07:00
checklist.txt doc: Update RCU documentation 2017-08-17 07:29:48 -07:00
listRCU.txt rcu: Update docs to include kfree_rcu() 2012-11-08 11:44:25 -08:00
lockdep-splat.txt kthread: kthread worker API cleanup 2016-10-11 15:06:33 -07:00
lockdep.txt documentation: RCU-protected array indexes no longer supported 2015-05-27 12:56:17 -07:00
NMI-RCU.txt rcu: Fix RCU's NMI documentation 2011-09-28 21:36:44 -07:00
rcu_dereference.txt doc: De-emphasize smp_read_barrier_depends 2017-12-05 11:57:53 -08:00
rcu.txt doc: Update RCU documentation 2017-08-17 07:29:48 -07:00
rcubarrier.txt doc: Update RCU documentation 2017-08-17 07:29:48 -07:00
rculist_nulls.txt mm: Rename SLAB_DESTROY_BY_RCU to SLAB_TYPESAFE_BY_RCU 2017-04-18 11:42:36 -07:00
rcuref.txt documentation: Add pointer to percpu-ref for RCU and refcount 2014-07-08 08:32:56 -07:00
RTFP.txt Documentation: fix common spelling mistakes 2016-04-28 07:51:59 -06:00
stallwarn.txt doc: Update RCU CPU stall-warning documentation 2018-07-12 15:38:51 -07:00
torture.txt doc: Update RCU documentation 2017-08-17 07:29:48 -07:00
UP.txt rcu: Add synchronize_sched_expedited() rcutorture doc + updates 2009-07-03 10:02:29 +02:00
whatisRCU.txt doc: Update synchronize_rcu() definition in whatisRCU.txt 2018-07-12 15:39:23 -07:00