Commit 586dd56a authored by Paul E. McKenney's avatar Paul E. McKenney

Documentation/memory-barriers.txt: Conditional must use prior load

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: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
parent 449f7413
...@@ -724,7 +724,8 @@ In summary: ...@@ -724,7 +724,8 @@ In summary:
later loads, smp_mb(). later loads, smp_mb().
(*) Control dependencies require at least one run-time conditional (*) 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 is able to optimize the conditional away, it will have also
optimized away the ordering. Careful use of ACCESS_ONCE() can optimized away the ordering. Careful use of ACCESS_ONCE() can
help to preserve the needed conditional. help to preserve the needed conditional.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment