Documentation/memory-barriers.txt: Conditional must use prior load
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 11 Feb 2014 20:28:06 +0000 (12:28 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 17 Feb 2014 22:56:07 +0000 (14:56 -0800)
A control dependency consists of a load, a conditional that depends on
that load, and a store.  This commit emphasizes this point in the
summary.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Documentation/memory-barriers.txt

index f9ff060d8320aa9e28f14a1645719aa23f6d9668..6b25efd455838a9c478fd15d0a87eea1155bcd5c 100644 (file)
@@ -724,7 +724,8 @@ In summary:
       later loads, smp_mb().
 
   (*) Control dependencies require at least one run-time conditional
-      between the prior load and the subsequent store.  If the compiler
+      between the prior load and the subsequent store, and this
+      conditional must involve the prior load.  If the compiler
       is able to optimize the conditional away, it will have also
       optimized away the ordering.  Careful use of ACCESS_ONCE() can
       help to preserve the needed conditional.