diff options
author | Joel Fernandes (Google) <joel@joelfernandes.org> | 2019-07-29 08:36:05 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.ibm.com> | 2019-08-09 13:28:57 -0400 |
commit | 6240973e5661a83df24e35a9a9c2013496931e2b (patch) | |
tree | 48d6df55eb10e2112b200d5d9954c1c40fb209e8 | |
parent | 7455cdd1a0fe9a1367ee99596ea2564031daec00 (diff) |
tools/memory-model: Use cumul-fence instead of fence in ->prop example
To reduce ambiguity in the more exotic ->prop ordering example, this
commit uses the term cumul-fence instead of the term fence for the two
fences, so that the implict ->rfe on loads/stores to Y are covered by
the description.
Link: https://lore.kernel.org/lkml/20190729121745.GA140682@google.com
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
-rw-r--r-- | tools/memory-model/Documentation/explanation.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/memory-model/Documentation/explanation.txt b/tools/memory-model/Documentation/explanation.txt index 68caa9a976d0..634dc6db26c4 100644 --- a/tools/memory-model/Documentation/explanation.txt +++ b/tools/memory-model/Documentation/explanation.txt | |||
@@ -1302,7 +1302,7 @@ followed by an arbitrary number of cumul-fence links, ending with an | |||
1302 | rfe link. You can concoct more exotic examples, containing more than | 1302 | rfe link. You can concoct more exotic examples, containing more than |
1303 | one fence, although this quickly leads to diminishing returns in terms | 1303 | one fence, although this quickly leads to diminishing returns in terms |
1304 | of complexity. For instance, here's an example containing a coe link | 1304 | of complexity. For instance, here's an example containing a coe link |
1305 | followed by two fences and an rfe link, utilizing the fact that | 1305 | followed by two cumul-fences and an rfe link, utilizing the fact that |
1306 | release fences are A-cumulative: | 1306 | release fences are A-cumulative: |
1307 | 1307 | ||
1308 | int x, y, z; | 1308 | int x, y, z; |
@@ -1334,10 +1334,10 @@ If x = 2, r0 = 1, and r2 = 1 after this code runs then there is a prop | |||
1334 | link from P0's store to its load. This is because P0's store gets | 1334 | link from P0's store to its load. This is because P0's store gets |
1335 | overwritten by P1's store since x = 2 at the end (a coe link), the | 1335 | overwritten by P1's store since x = 2 at the end (a coe link), the |
1336 | smp_wmb() ensures that P1's store to x propagates to P2 before the | 1336 | smp_wmb() ensures that P1's store to x propagates to P2 before the |
1337 | store to y does (the first fence), the store to y propagates to P2 | 1337 | store to y does (the first cumul-fence), the store to y propagates to P2 |
1338 | before P2's load and store execute, P2's smp_store_release() | 1338 | before P2's load and store execute, P2's smp_store_release() |
1339 | guarantees that the stores to x and y both propagate to P0 before the | 1339 | guarantees that the stores to x and y both propagate to P0 before the |
1340 | store to z does (the second fence), and P0's load executes after the | 1340 | store to z does (the second cumul-fence), and P0's load executes after the |
1341 | store to z has propagated to P0 (an rfe link). | 1341 | store to z has propagated to P0 (an rfe link). |
1342 | 1342 | ||
1343 | In summary, the fact that the hb relation links memory access events | 1343 | In summary, the fact that the hb relation links memory access events |