Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25524
b: refs/heads/master
c: c14038c
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and Linus Torvalds committed Apr 11, 2006
1 parent 9c0d274 commit 762168a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dbc8700e27a94621de9d22c506c67913e0121501
refs/heads/master: c14038c39ddd9c14225907a05a6ac4d91d645ef1
16 changes: 15 additions & 1 deletion trunk/Documentation/memory-barriers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ loads. Consider the following sequence of events:

CPU 1 CPU 2
======================= =======================
{ B = 7; X = 9; Y = 8; C = &Y }
STORE A = 1
STORE B = 2
<write barrier>
Expand Down Expand Up @@ -651,7 +652,20 @@ In the above example, CPU 2 perceives that B is 7, despite the load of *C
(which would be B) coming after the the LOAD of C.

If, however, a data dependency barrier were to be placed between the load of C
and the load of *C (ie: B) on CPU 2, then the following will occur:
and the load of *C (ie: B) on CPU 2:

CPU 1 CPU 2
======================= =======================
{ B = 7; X = 9; Y = 8; C = &Y }
STORE A = 1
STORE B = 2
<write barrier>
STORE C = &B LOAD X
STORE D = 4 LOAD C (gets &B)
<data dependency barrier>
LOAD *C (reads B)

then the following will occur:

+-------+ : : : :
| | +------+ +-------+
Expand Down

0 comments on commit 762168a

Please sign in to comment.