Documentation: rewrite confusing statement about memory barriers
Subsystems (2)
PATCH v2 1/1 Documentation: rewrite confusing statement about memory barriers
In this specific portion of the write memory barriers description, the documentation mentions sequential order of stores, which is confusing since sequential ordering is not guaranteed.
This patch tries to improve the doc in order to avoid any mis-understanding.
---
v2: added Paul in CC.
Documentation/memory-barriers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/memory-barriers.txt +2 -2
@@ -383,8 +383,8 @@ Memory barriers come in four basic varieties: to have any effect on loads. A CPU can be viewed as committing a sequence of store operations to the - memory system as time progresses. All stores before a write barrier will - occur in the sequence _before_ all the stores after the write barrier. + memory system as time progresses. All stores _before_ a write barrier + will occur _before_ all the stores after the write barrier. [!] Note that write barriers should normally be paired with read or data dependency barriers; see the "SMP barrier pairing" subsection.
Signature · 1 line
2.14.1
Paul E. McKenney
AppliedQuoted 9 lines · Guilherme G. Piccoli
In this specific portion of the write memory barriers description, the documentation mentions sequential order of stores, which is confusing since sequential ordering is not guaranteed.
This patch tries to improve the doc in order to avoid any mis-understanding.
Cc Paul E. McKenney <[email protected]>Signed-off-by Guilherme G. Piccoli <[email protected]>
Good catch, and you are quite correct, a write barrier orders only before and after itself, doing nothing to impose order on preceding writes among themselves.
Applied, thank you!
Thanx, Paul
Quoted 25 lines
---
v2: added Paul in CC.
Documentation/memory-barriers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Documentation/memory-barriers.txt +2
-2@@ -383,8 +383,8 @@ Memory barriers come in four basic varieties: to have any effect on loads. A CPU can be viewed as committing a sequence of store operations to the - memory system as time progresses. All stores before a write barrier will - occur in the sequence _before_ all the stores after the write barrier. + memory system as time progresses. All stores _before_ a write barrier + will occur _before_ all the stores after the write barrier. [!] Note that write barriers should normally be paired with read or data dependency barriers; see the "SMP barrier pairing" subsection.Signature · 1 line
2.14.1
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Guilherme G. Piccoli
In this specific portion of the write memory barriers description, the documentation mentions sequential order of stores, which is confusing since sequential ordering is not guaranteed.
This patch tries to improve the doc in order to avoid any mis-understanding.
Quoted 6 lines
Quoted 2 lines
Cc Paul E. McKenney <[email protected]>Signed-off-by Guilherme G. Piccoli <[email protected]>Good catch, and you are quite correct, a write barrier orders only before and after itself, doing nothing to impose order on preceding writes among themselves.
That's nice, thanks a lot Paul! :)
Quoted 30 lines
Applied, thank you!
Thanx, Paul
Quoted 25 lines
---
v2: added Paul in CC.
Documentation/memory-barriers.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Documentation/memory-barriers.txt +2
-2@@ -383,8 +383,8 @@ Memory barriers come in four basic varieties: to have any effect on loads. A CPU can be viewed as committing a sequence of store operations to the - memory system as time progresses. All stores before a write barrier will - occur in the sequence _before_ all the stores after the write barrier. + memory system as time progresses. All stores _before_ a write barrier + will occur _before_ all the stores after the write barrier. [!] Note that write barriers should normally be paired with read or data dependency barriers; see the "SMP barrier pairing" subsection.Signature · 1 line
2.14.1