Skip to contentSkip to conversation

fix trivial problems in advanced synchronization chapter

PATCH Applied SeongJae Park 3 participants 24 messages Apr 2, 2016 – Apr 7, 2016

lore
Share & tools
lore
#0 lore raw

cover fix trivial problems in advanced synchronization chapter

This patchset fixes trivial problems in Advanced Synchronization chapter that found while translation.

SeongJae Park (6):
advsync: fix trivial typos
advsync: fix latex syntax related typos
advsync: use latex reference feature consistently
advsync: fix wrong code example
advsync: fix critical section bleed-in description
advsync: fix wrong reference to section ``MMIO write barrier''

 advsync/advsync.tex        |  8 ++++----
 advsync/memorybarriers.tex | 51 ++++++++++++++++++++++++----------------------
 2 files changed, 31 insertions(+), 28 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/6 advsync: fix trivial typos

This commit fixes trivial typos under advsync/ directory.

---
 advsync/advsync.tex        | 4 ++--
 advsync/memorybarriers.tex | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
advsync/advsync.tex +2 -2
index 7250e96..118dc74 100644
@@ -30,7 +30,7 @@ gives a brief overview of non-blocking synchronization.
 
 Although locking is the workhorse of parallelism in production, in
 many situations performance, scalability, and real-time response can
-all be greatly improved though use of lockless techniques.
+all be greatly improved through use of lockless techniques.
 A particularly impressive example of such a lockless technique are
 the statistical counters describe in
 Section~\ref{sec:count:Statistical Counters},
@@ -45,7 +45,7 @@ Other examples we have covered include:
 	Section~\ref{sec:SMPdesign:Resource Allocator Caches}.
 \item	The maze solver in Section~\ref{sec:SMPdesign:Beyond Partitioning}.
 \item	The data-ownership techniques described in
-	Section~\ref{chp:Data Ownership}.
+	Chapter~\ref{chp:Data Ownership}.
 \item	The reference-counting and RCU techinques described in
 	Chapter~\ref{chp:Deferred Processing}.
 \item	The lookup code paths described in Chapter~\ref{chp:Data Structures}.
advsync/memorybarriers.tex +2 -2
index 99e074d..c668f3c 100644
@@ -759,7 +759,7 @@ these combinations in order to fully understand how this works.
 	it is not possible for one of the loads to see the
 	results of the other load.
 	However, if we know that CPU~2's load from B returned a
-	newer value than CPU~1's load from B, the we also know
+	newer value than CPU~1's load from B, then we also know
 	that CPU~2's load from A returned either the same value
 	as CPU~1's load from A or some later value.
 
@@ -1047,7 +1047,7 @@ a few simple rules:
 	by the first CPU, then the second CPU's load from A must
 	give the value stored by the first CPU.
 \item	If one CPU does a load from A ordered before a store to B,
-	and if a second CPU does a load from B ordered before a store from A,
+	and if a second CPU does a load from B ordered before a store to A,
 	and if the second CPU's load from B gives the value stored by
 	the first CPU, then the first CPU's load from A must \emph{not}
 	give the value stored by the second CPU.
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH 1/6] advsync: Fix trivial typos

Quoted 3 lines · SeongJae Park

This commit fixes trivial typos under advsync/ directory.

Queued, thank you!

Thanx, Paul

Quoted 52 lines
---
 advsync/advsync.tex        | 4 ++--
 advsync/memorybarriers.tex | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
advsync/advsync.tex +2 -2
index 7250e96..118dc74 100644
@@ -30,7 +30,7 @@ gives a brief overview of non-blocking synchronization.
 
 Although locking is the workhorse of parallelism in production, in
 many situations performance, scalability, and real-time response can
-all be greatly improved though use of lockless techniques.
+all be greatly improved through use of lockless techniques.
 A particularly impressive example of such a lockless technique are
 the statistical counters describe in
 Section~\ref{sec:count:Statistical Counters},
@@ -45,7 +45,7 @@ Other examples we have covered include:
 	Section~\ref{sec:SMPdesign:Resource Allocator Caches}.
 \item	The maze solver in Section~\ref{sec:SMPdesign:Beyond Partitioning}.
 \item	The data-ownership techniques described in
-	Section~\ref{chp:Data Ownership}.
+	Chapter~\ref{chp:Data Ownership}.
 \item	The reference-counting and RCU techinques described in
 	Chapter~\ref{chp:Deferred Processing}.
 \item	The lookup code paths described in Chapter~\ref{chp:Data Structures}.
advsync/memorybarriers.tex +2 -2
index 99e074d..c668f3c 100644
@@ -759,7 +759,7 @@ these combinations in order to fully understand how this works.
 	it is not possible for one of the loads to see the
 	results of the other load.
 	However, if we know that CPU~2's load from B returned a
-	newer value than CPU~1's load from B, the we also know
+	newer value than CPU~1's load from B, then we also know
 	that CPU~2's load from A returned either the same value
 	as CPU~1's load from A or some later value.
 
@@ -1047,7 +1047,7 @@ a few simple rules:
 	by the first CPU, then the second CPU's load from A must
 	give the value stored by the first CPU.
 \item	If one CPU does a load from A ordered before a store to B,
-	and if a second CPU does a load from B ordered before a store from A,
+	and if a second CPU does a load from B ordered before a store to A,
 	and if the second CPU's load from B gives the value stored by
 	the first CPU, then the first CPU's load from A must \emph{not}
 	give the value stored by the second CPU.
Signature · 1 line
1.9.1
#3 lore raw

PATCH 2/6 advsync: fix latex syntax related typos

In reply to SeongJae Park

This commit fixes typos related with latex. The typos include:
unnecessarily doubly inserted commas, missed tildes, missed dots, wrongly located dot and question mark, unwrapped citation.

---
 advsync/advsync.tex        |  4 ++--
 advsync/memorybarriers.tex | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 13 deletions(-)
advsync/advsync.tex +2 -2
index 118dc74..12bacbf 100644
@@ -78,14 +78,14 @@ basis of real-time programming:
 \begin{enumerate}
 \item	Real-time forward-progress guarantees usually have some
 	definite time associated with them, for example,
-	``scheduling latency must be less than 100 microseconds.''
+	``scheduling latency must be less than 100 microseconds.''.
 	In contrast, the most popular forms of NBS only guarantees
 	that progress will be made in finite time, with no definite
 	bound.
 \item	Real-time forward-progress guarantees are sometimes
 	probabilistic, as in the soft-real-time guarantee that
 	``at least 99.9\% of the time, scheduling latency must
-	be less than 100 microseconds.''
+	be less than 100 microseconds.''.
 	In contrast, NBS's forward-progress
 	guarantees have traditionally been unconditional.
 \item	Real-time forward-progress guarantees are often conditioned on
advsync/memorybarriers.tex +11 -11
index c668f3c..15de36a 100644
@@ -37,7 +37,7 @@ appears to guarantee that the assertion never fires.
 After all, if \co{r1 != 1}, we might hope that Thread~1's load from \co{y}
 must have happened before Thread~2's store to \co{y}, which might raise
 further hopes that Thread~2's load from \co{x} must happen after
-Thread 1's store to \co{x}, so that \co{r2 == 1}, as required by the
+Thread~1's store to \co{x}, so that \co{r2 == 1}, as required by the
 assertion.
 The example is symmetric, so similar hopeful reasoning might lead
 us to hope that \co{r2 != 1} guarantees that \co{r1 == 1}.
@@ -295,7 +295,7 @@ over a 532-nanosecond time period, as shown in
 Figure~\ref{fig:advsync:A Variable With Multiple Simultaneous Values}.
 This data was collected on 1.5GHz POWER5 system with 8 cores, each containing
 a pair of hardware threads.
-CPUs~1, 2, 3, and 4 recorded the values, while CPU 0 controlled the test.
+CPUs~1, 2, 3, and 4 recorded the values, while CPU~0 controlled the test.
 The timebase counter period was about 5.32ns, sufficiently fine-grained
 to allow observations of intermediate cache states.
 
@@ -320,7 +320,7 @@ CPU~4 believes that the value is ``4'' for almost 500ns.
 
 \QuickQuiz{}
 	How could CPUs possibly have different views of the
-	value of a single variable \emph{at the same time?}
+	value of a single variable \emph{at the same time}?
 \QuickQuizAnswer{
 	Many CPUs have write buffers that record the values of
 	recent writes, which are applied once the corresponding
@@ -459,8 +459,8 @@ For example, in the following set of operations, CPU~1's access to
 A does not unconditionally precede its access to B from the viewpoint
 of an external logic analyzer
 \IfInBook{(see Appendix~\ref{chp:app:whymb:Why Memory Barriers?}
-	  for examples).
-	 }
+	  for examples)
+	 }.
 	 {(the system is only to act \emph{as if} the accesses
 	  are in order; it is not necessarily required to actually
 	  force them to be in order).}
@@ -1037,10 +1037,10 @@ a few simple rules:
 		for example, if a given CPU never loaded or stored
 		the shared variable, then it can have no opinion about
 		that variable's value.}
-\item	If one CPU does ordered stores to variables A and B,\footnote{
+\item	If one CPU does ordered stores to variables A and B\footnote{
 		For example, by executing the store to A, a
 		memory barrier, and then the store to B.},
-	and if a second CPU does ordered loads from B and A,\footnote{
+	and if a second CPU does ordered loads from B and A\footnote{
 		For example, by executing the load from B, a
 		memory barrier, and then the load from A.},
 	then if the second CPU's load from B gives the value stored
@@ -1903,9 +1903,9 @@ In the above example, CPU~2 perceives that \co{B} is 7,
 despite the load of \co{*C}
 (which would be \co{B}) coming after the \co{LOAD} of \co{C}.
 
-If, however, a data dependency barrier were to be placed between the load of C
-and the load of \co{*C} (i.e.: \co{B}) on CPU~2, again with initial values of
-{\tt \{B = 7, X = 9, Y = 8, C = \&Y\}}:
+If, however, a data dependency barrier were to be placed between the load of
+\co{C} and the load of \co{*C} (i.e.: \co{B}) on CPU~2, again with initial
+values of {\tt \{B = 7, X = 9, Y = 8, C = \&Y\}}:
 
 \vspace{5pt}
 \begin{minipage}[t]{\columnwidth}
@@ -2002,7 +2002,7 @@ Figure~\ref{fig:advsync:Read Barrier Supplied}.
 \end{figure*}
 
 To illustrate this more completely, consider what could happen if the code
-contained a load of A either side of the read barrier, once again
+contained a load of \co{A} either side of the read barrier, once again
 with the same initial values of
 {\tt \{A = 0, B = 9\}}:
 
Signature · 1 line
1.9.1
#4 lore raw

Re: [PATCH 2/6] advsync: fix latex syntax related typos

Quoted 5 lines · SeongJae Park

This commit fixes typos related with latex. The typos include:
unnecessarily doubly inserted commas, missed tildes, missed dots, wrongly located dot and question mark, unwrapped citation.

Some good ones, and some that I cannot accept. Could you please resubmit as noted below?

Thanx, Paul

Quoted 10 lines
---
 advsync/advsync.tex        |  4 ++--
 advsync/memorybarriers.tex | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 13 deletions(-)
advsync/advsync.tex +0 -0
index 118dc74..12bacbf 100644

advsync/advsync.tex basis of real-time programming: · line 81

Quoted 5 lines
advsync/advsync.tex +1 -1
@@ -78,14 +78,14 @@ basis of real-time programming:
 \begin{enumerate}
 \item	Real-time forward-progress guarantees usually have some
 	definite time associated with them, for example,
-	``scheduling latency must be less than 100 microseconds.''
+	``scheduling latency must be less than 100 microseconds.''.

We should have be period either before or after the quates, not both. The exception would be if the quotes contained a computer command that ended with a period.

advsync/advsync.tex basis of real-time programming: · line 88

Quoted 8 lines
advsync/advsync.tex +1 -1
 	In contrast, the most popular forms of NBS only guarantees
 	that progress will be made in finite time, with no definite
 	bound.
 \item	Real-time forward-progress guarantees are sometimes
 	probabilistic, as in the soft-real-time guarantee that
 	``at least 99.9\% of the time, scheduling latency must
-	be less than 100 microseconds.''
+	be less than 100 microseconds.''.

Ditto.

advsync/memorybarriers.tex appears to guarantee that the assertion never fires. · line 40

Quoted 13 lines
advsync/advsync.tex +0 -0
 	In contrast, NBS's forward-progress
 	guarantees have traditionally been unconditional.
 \item	Real-time forward-progress guarantees are often conditioned on
advsync/memorybarriers.tex +1 -1
index c668f3c..15de36a 100644
@@ -37,7 +37,7 @@ appears to guarantee that the assertion never fires.
 After all, if \co{r1 != 1}, we might hope that Thread~1's load from \co{y}
 must have happened before Thread~2's store to \co{y}, which might raise
 further hopes that Thread~2's load from \co{x} must happen after
-Thread 1's store to \co{x}, so that \co{r2 == 1}, as required by the
+Thread~1's store to \co{x}, so that \co{r2 == 1}, as required by the

This is fine.

advsync/memorybarriers.tex over a 532-nanosecond time period, as shown in · line 298

Quoted 9 lines
advsync/memorybarriers.tex +1 -1
 assertion.
 The example is symmetric, so similar hopeful reasoning might lead
 us to hope that \co{r2 != 1} guarantees that \co{r1 == 1}.
@@ -295,7 +295,7 @@ over a 532-nanosecond time period, as shown in
 Figure~\ref{fig:advsync:A Variable With Multiple Simultaneous Values}.
 This data was collected on 1.5GHz POWER5 system with 8 cores, each containing
 a pair of hardware threads.
-CPUs~1, 2, 3, and 4 recorded the values, while CPU 0 controlled the test.
+CPUs~1, 2, 3, and 4 recorded the values, while CPU~0 controlled the test.

This is a good change, but should have "and~4" as well.

advsync/memorybarriers.tex CPU~4 believes that the value is ``4'' for almost 500ns. · line 323

Quoted 9 lines
advsync/memorybarriers.tex +1 -1
 The timebase counter period was about 5.32ns, sufficiently fine-grained
 to allow observations of intermediate cache states.
 
@@ -320,7 +320,7 @@ CPU~4 believes that the value is ``4'' for almost 500ns.
 
 \QuickQuiz{}
 	How could CPUs possibly have different views of the
-	value of a single variable \emph{at the same time?}
+	value of a single variable \emph{at the same time}?

It looks better if the question mark has the same itailics state as the word immediately preceding it, so this should remain as is.

advsync/memorybarriers.tex For example, in the following set of operations, CPU~1's access to · line 463

Quoted 11 lines
advsync/memorybarriers.tex +2 -2
 \QuickQuizAnswer{
 	Many CPUs have write buffers that record the values of
 	recent writes, which are applied once the corresponding
@@ -459,8 +459,8 @@ For example, in the following set of operations, CPU~1's access to
 A does not unconditionally precede its access to B from the viewpoint
 of an external logic analyzer
 \IfInBook{(see Appendix~\ref{chp:app:whymb:Why Memory Barriers?}
-	  for examples).
-	 }
+	  for examples)
+	 }.

Aren't the "then" and "else" clauses supposed to be right next to each other? I don't believe this change works.

advsync/memorybarriers.tex a few simple rules: · line 1043

Quoted 13 lines
advsync/memorybarriers.tex +2 -2
 	 {(the system is only to act \emph{as if} the accesses
 	  are in order; it is not necessarily required to actually
 	  force them to be in order).}
@@ -1037,10 +1037,10 @@ a few simple rules:
 		for example, if a given CPU never loaded or stored
 		the shared variable, then it can have no opinion about
 		that variable's value.}
-\item	If one CPU does ordered stores to variables A and B,\footnote{
+\item	If one CPU does ordered stores to variables A and B\footnote{
 		For example, by executing the store to A, a
 		memory barrier, and then the store to B.},
-	and if a second CPU does ordered loads from B and A,\footnote{
+	and if a second CPU does ordered loads from B and A\footnote{

The footnote should be after the comma, otherwise the spacing looks strange. (Might be different in Korean, of course.)

advsync/memorybarriers.tex In the above example, CPU~2 perceives that \co{B} is 7, · line 1908

Quoted 13 lines
advsync/memorybarriers.tex +3 -3
 		For example, by executing the load from B, a
 		memory barrier, and then the load from A.},
 	then if the second CPU's load from B gives the value stored
@@ -1903,9 +1903,9 @@ In the above example, CPU~2 perceives that \co{B} is 7,
 despite the load of \co{*C}
 (which would be \co{B}) coming after the \co{LOAD} of \co{C}.
 
-If, however, a data dependency barrier were to be placed between the load of C
-and the load of \co{*C} (i.e.: \co{B}) on CPU~2, again with initial values of
-{\tt \{B = 7, X = 9, Y = 8, C = \&Y\}}:
+If, however, a data dependency barrier were to be placed between the load of
+\co{C} and the load of \co{*C} (i.e.: \co{B}) on CPU~2, again with initial
+values of {\tt \{B = 7, X = 9, Y = 8, C = \&Y\}}:

This one looks good.

advsync/memorybarriers.tex Figure~\ref{fig:advsync:Read Barrier Supplied}. · line 2005

Quoted 8 lines
advsync/memorybarriers.tex +1 -1
 \vspace{5pt}
 \begin{minipage}[t]{\columnwidth}
@@ -2002,7 +2002,7 @@ Figure~\ref{fig:advsync:Read Barrier Supplied}.
 \end{figure*}
 
 To illustrate this more completely, consider what could happen if the code
-contained a load of A either side of the read barrier, once again
+contained a load of \co{A} either side of the read barrier, once again

This one does too.

Quoted 6 lines
advsync/memorybarriers.tex +0 -0
 with the same initial values of
 {\tt \{A = 0, B = 9\}}:
 
Signature · 1 line
1.9.1
#5 lore raw

Re: [PATCH 2/6] advsync: fix latex syntax related typos

Hello,

Quoted 9 lines · Paul E. McKenney
Quoted 5 lines · SeongJae Park

This commit fixes typos related with latex. The typos include:
unnecessarily doubly inserted commas, missed tildes, missed dots, wrongly located dot and question mark, unwrapped citation.

Some good ones, and some that I cannot accept. Could you please resubmit as noted below?

Thanks for your opinion. I will do resubmit soon.

Quoted 8 lines

Thanx, Paul

Quoted 5 lines
---
 advsync/advsync.tex        |  4 ++--
 advsync/memorybarriers.tex | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 13 deletions(-)
Quoted 14 lines

advsync/advsync.tex basis of real-time programming: · line 81

Quoted 10 lines
advsync/advsync.tex +1 -1
index 118dc74..12bacbf 100644
@@ -78,14 +78,14 @@ basis of real-time programming:
 \begin{enumerate}
 \item	Real-time forward-progress guarantees usually have some
 	definite time associated with them, for example,
-	``scheduling latency must be less than 100 microseconds.''
+	``scheduling latency must be less than 100 microseconds.''.

We should have be period either before or after the quates, not both. The exception would be if the quotes contained a computer command that ended with a period.

Okay.

Quoted 11 lines

advsync/advsync.tex basis of real-time programming: · line 88

Quoted 9 lines
advsync/advsync.tex +1 -1
 	In contrast, the most popular forms of NBS only guarantees
 	that progress will be made in finite time, with no definite
 	bound.
 \item	Real-time forward-progress guarantees are sometimes
 	probabilistic, as in the soft-real-time guarantee that
 	``at least 99.9\% of the time, scheduling latency must
-	be less than 100 microseconds.''
+	be less than 100 microseconds.''.

Ditto.

Okay.

Quoted 34 lines
Quoted 9 lines
advsync/advsync.tex +0 -0
 	In contrast, NBS's forward-progress
 	guarantees have traditionally been unconditional.
 \item	Real-time forward-progress guarantees are often conditioned on
advsync/memorybarriers.tex +0 -0
index c668f3c..15de36a 100644

advsync/memorybarriers.tex appears to guarantee that the assertion never fires. · line 40

Quoted 5 lines
advsync/memorybarriers.tex +1 -1
@@ -37,7 +37,7 @@ appears to guarantee that the assertion never fires.
 After all, if \co{r1 != 1}, we might hope that Thread~1's load from \co{y}
 must have happened before Thread~2's store to \co{y}, which might raise
 further hopes that Thread~2's load from \co{x} must happen after
-Thread 1's store to \co{x}, so that \co{r2 == 1}, as required by the
+Thread~1's store to \co{x}, so that \co{r2 == 1}, as required by the

This is fine.

advsync/memorybarriers.tex over a 532-nanosecond time period, as shown in · line 298

Quoted 9 lines
advsync/memorybarriers.tex +1 -1
 assertion.
 The example is symmetric, so similar hopeful reasoning might lead
 us to hope that \co{r2 != 1} guarantees that \co{r1 == 1}.
@@ -295,7 +295,7 @@ over a 532-nanosecond time period, as shown in
 Figure~\ref{fig:advsync:A Variable With Multiple Simultaneous Values}.
 This data was collected on 1.5GHz POWER5 system with 8 cores, each containing
 a pair of hardware threads.
-CPUs~1, 2, 3, and 4 recorded the values, while CPU 0 controlled the test.
+CPUs~1, 2, 3, and 4 recorded the values, while CPU~0 controlled the test.

This is a good change, but should have "and~4" as well.

Quoted 5 lines
advsync/memorybarriers.tex +0 -0
 The timebase counter period was about 5.32ns, sufficiently fine-grained
 to allow observations of intermediate cache states.
 
@@ -320,7 +320,7 @@ CPU~4 believes that the value is ``4'' for almost 500ns.
 
Quoted 7 lines

advsync/memorybarriers.tex CPU~4 believes that the value is ``4'' for almost 500ns. · line 323

Quoted 4 lines
advsync/memorybarriers.tex +1 -1
 \QuickQuiz{}
 	How could CPUs possibly have different views of the
-	value of a single variable \emph{at the same time?}
+	value of a single variable \emph{at the same time}?

It looks better if the question mark has the same itailics state as the word immediately preceding it, so this should remain as is.

Okay.

Quoted 15 lines

advsync/memorybarriers.tex For example, in the following set of operations, CPU~1's access to · line 463

Quoted 12 lines
advsync/memorybarriers.tex +2 -2
 \QuickQuizAnswer{
 	Many CPUs have write buffers that record the values of
 	recent writes, which are applied once the corresponding
@@ -459,8 +459,8 @@ For example, in the following set of operations, CPU~1's access to
 A does not unconditionally precede its access to B from the viewpoint
 of an external logic analyzer
 \IfInBook{(see Appendix~\ref{chp:app:whymb:Why Memory Barriers?}
-	  for examples).
-	 }
+	  for examples)
+	 }.

Aren't the "then" and "else" clauses supposed to be right next to each other? I don't believe this change works.

Ah, you're right.

Quoted 17 lines
Quoted 5 lines
advsync/memorybarriers.tex +0 -0
 	 {(the system is only to act \emph{as if} the accesses
 	  are in order; it is not necessarily required to actually
 	  force them to be in order).}

advsync/memorybarriers.tex a few simple rules: · line 1043

Quoted 9 lines
advsync/memorybarriers.tex +2 -2
@@ -1037,10 +1037,10 @@ a few simple rules:
 		for example, if a given CPU never loaded or stored
 		the shared variable, then it can have no opinion about
 		that variable's value.}
-\item	If one CPU does ordered stores to variables A and B,\footnote{
+\item	If one CPU does ordered stores to variables A and B\footnote{
 		For example, by executing the store to A, a
 		memory barrier, and then the store to B.},
-	and if a second CPU does ordered loads from B and A,\footnote{
+	and if a second CPU does ordered loads from B and A\footnote{

The footnote should be after the comma, otherwise the spacing looks strange. (Might be different in Korean, of course.)

Okay.

Thanks,
SeongJae Park

Quoted 36 lines
Quoted 5 lines
advsync/memorybarriers.tex +0 -0
 		For example, by executing the load from B, a
 		memory barrier, and then the load from A.},
 	then if the second CPU's load from B gives the value stored

advsync/memorybarriers.tex In the above example, CPU~2 perceives that \co{B} is 7, · line 1908

Quoted 9 lines
advsync/memorybarriers.tex +3 -3
@@ -1903,9 +1903,9 @@ In the above example, CPU~2 perceives that \co{B} is 7,
 despite the load of \co{*C}
 (which would be \co{B}) coming after the \co{LOAD} of \co{C}.
 
-If, however, a data dependency barrier were to be placed between the load of C
-and the load of \co{*C} (i.e.: \co{B}) on CPU~2, again with initial values of
-{\tt \{B = 7, X = 9, Y = 8, C = \&Y\}}:
+If, however, a data dependency barrier were to be placed between the load of
+\co{C} and the load of \co{*C} (i.e.: \co{B}) on CPU~2, again with initial
+values of {\tt \{B = 7, X = 9, Y = 8, C = \&Y\}}:

This one looks good.

advsync/memorybarriers.tex Figure~\ref{fig:advsync:Read Barrier Supplied}. · line 2005

Quoted 8 lines
advsync/memorybarriers.tex +1 -1
 \vspace{5pt}
 \begin{minipage}[t]{\columnwidth}
@@ -2002,7 +2002,7 @@ Figure~\ref{fig:advsync:Read Barrier Supplied}.
 \end{figure*}
 
 To illustrate this more completely, consider what could happen if the code
-contained a load of A either side of the read barrier, once again
+contained a load of \co{A} either side of the read barrier, once again

This one does too.

Quoted 6 lines
advsync/memorybarriers.tex +0 -1
 with the same initial values of
 {\tt \{A = 0, B = 9\}}:
 
--

1.9.1

#6 lore raw

PATCH 1/1 advsync: fix latex syntax related typos

This commit fixes typos related with latex. The typos include:
missed tildes, doubly inserted commas, and incinsistently formatted code citations.

---
 advsync/memorybarriers.tex | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
advsync/memorybarriers.tex +8 -8
index c668f3c..47d910a 100644
@@ -37,7 +37,7 @@ appears to guarantee that the assertion never fires.
 After all, if \co{r1 != 1}, we might hope that Thread~1's load from \co{y}
 must have happened before Thread~2's store to \co{y}, which might raise
 further hopes that Thread~2's load from \co{x} must happen after
-Thread 1's store to \co{x}, so that \co{r2 == 1}, as required by the
+Thread~1's store to \co{x}, so that \co{r2 == 1}, as required by the
 assertion.
 The example is symmetric, so similar hopeful reasoning might lead
 us to hope that \co{r2 != 1} guarantees that \co{r1 == 1}.
@@ -295,7 +295,7 @@ over a 532-nanosecond time period, as shown in
 Figure~\ref{fig:advsync:A Variable With Multiple Simultaneous Values}.
 This data was collected on 1.5GHz POWER5 system with 8 cores, each containing
 a pair of hardware threads.
-CPUs~1, 2, 3, and 4 recorded the values, while CPU 0 controlled the test.
+CPUs~1, 2, 3, and~4 recorded the values, while CPU~0 controlled the test.
 The timebase counter period was about 5.32ns, sufficiently fine-grained
 to allow observations of intermediate cache states.
 
@@ -1039,10 +1039,10 @@ a few simple rules:
 		that variable's value.}
 \item	If one CPU does ordered stores to variables A and B,\footnote{
 		For example, by executing the store to A, a
-		memory barrier, and then the store to B.},
+		memory barrier, and then the store to B.}
 	and if a second CPU does ordered loads from B and A,\footnote{
 		For example, by executing the load from B, a
-		memory barrier, and then the load from A.},
+		memory barrier, and then the load from A.}
 	then if the second CPU's load from B gives the value stored
 	by the first CPU, then the second CPU's load from A must
 	give the value stored by the first CPU.
@@ -1903,9 +1903,9 @@ In the above example, CPU~2 perceives that \co{B} is 7,
 despite the load of \co{*C}
 (which would be \co{B}) coming after the \co{LOAD} of \co{C}.
 
-If, however, a data dependency barrier were to be placed between the load of C
-and the load of \co{*C} (i.e.: \co{B}) on CPU~2, again with initial values of
-{\tt \{B = 7, X = 9, Y = 8, C = \&Y\}}:
+If, however, a data dependency barrier were to be placed between the load of
+\co{C} and the load of \co{*C} (i.e.: \co{B}) on CPU~2, again with initial
+values of {\tt \{B = 7, X = 9, Y = 8, C = \&Y\}}:
 
 \vspace{5pt}
 \begin{minipage}[t]{\columnwidth}
@@ -2002,7 +2002,7 @@ Figure~\ref{fig:advsync:Read Barrier Supplied}.
 \end{figure*}
 
 To illustrate this more completely, consider what could happen if the code
-contained a load of A either side of the read barrier, once again
+contained a load of \co{A} either side of the read barrier, once again
 with the same initial values of
 {\tt \{A = 0, B = 9\}}:
 
Signature · 1 line
1.9.1
#7 lore raw

PATCH 3/6 advsync: use latex reference feature consistently

In reply to SeongJae Park

References to other sections in Advanced Synchronization chapter use latex reference feature and section name direct citation inconsistently. Because most other parts are using latex reference feature and it is easier for document maintainance, it would be better to use latex reference feature only. For the reason, this commit enforces latex reference feature to the references.

---
 advsync/memorybarriers.tex | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
advsync/memorybarriers.tex +9 -7
index 15de36a..ee9312d 100644
@@ -1454,7 +1454,8 @@ memory system as time progresses.  All stores before a write barrier will
 occur in the sequence \emph{before} all the stores after the write barrier.
 
 $\dagger$ Note that write barriers should normally be paired with read
-or data dependency barriers; see the ``SMP barrier pairing'' subsection.
+or data dependency barriers; see the
+Section~\ref{sec:advsync:SMP Barrier Pairing}.
 
 \paragraph{Data Dependency Barriers}
 
@@ -1479,19 +1480,19 @@ time the barrier completes, the effects of all the stores prior to that
 touched by the load will be perceptible to any loads issued after the data
 dependency barrier.
 
-See the ``Examples of memory barrier sequences'' subsection for diagrams
-showing the ordering constraints.
+See the Section~\ref{sec:advsync:Examples of Memory Barrier Pairings} for
+diagrams showing the ordering constraints.
 
 $\dagger$ Note that the first load really has to have a
 \emph{data} dependency and
 not a control dependency.  If the address for the second load is dependent
 on the first load, but the dependency is through a conditional rather than
 actually loading the address itself, then it's a \emph{control} dependency and
-a full read barrier or better is required.  See the ``Control dependencies''
-subsection for more information.
+a full read barrier or better is required.  See the
+Section~\ref{sec:advsync:Control Dependencies} for more information.
 
 $\dagger$ Note that data dependency barriers should normally be paired with
-write barriers; see the ``SMP barrier pairing'' subsection.
+write barriers; see the Section~\ref{sec:advsync:SMP Barrier Pairign}.
 
 \paragraph{Read Memory Barriers}
 
@@ -1593,7 +1594,8 @@ of the confines of a given architecture:
 \item	There is no guarantee that a CPU will see the correct order
 	of effects from a second CPU's accesses, even \emph{if} the second CPU
 	uses a memory barrier, unless the first CPU \emph{also} uses a matching
-	memory barrier (see the subsection on ``SMP Barrier Pairing'').
+	memory barrier (see the
+	Section~\ref{sec:advsync:SMP Barrier Pairing}).
 \item	There is no guarantee that some intervening piece of off-the-CPU
 	hardware\footnote{
 		This is of concern primarily in operating-system kernels.
Signature · 1 line
1.9.1
#8 lore raw

Re: [PATCH 3/6] advsync: use latex reference feature consistently

Quoted 8 lines · SeongJae Park

References to other sections in Advanced Synchronization chapter use latex reference feature and section name direct citation inconsistently. Because most other parts are using latex reference feature and it is easier for document maintainance, it would be better to use latex reference feature only. For the reason, this commit enforces latex reference feature to the references.

One issue below, please fix and resubmit.

Quoted 30 lines
---
 advsync/memorybarriers.tex | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
advsync/memorybarriers.tex +4 -3
index 15de36a..ee9312d 100644
@@ -1454,7 +1454,8 @@ memory system as time progresses.  All stores before a write barrier will
 occur in the sequence \emph{before} all the stores after the write barrier.
 
 $\dagger$ Note that write barriers should normally be paired with read
-or data dependency barriers; see the ``SMP barrier pairing'' subsection.
+or data dependency barriers; see the
+Section~\ref{sec:advsync:SMP Barrier Pairing}.
 
 \paragraph{Data Dependency Barriers}
 
@@ -1479,19 +1480,19 @@ time the barrier completes, the effects of all the stores prior to that
 touched by the load will be perceptible to any loads issued after the data
 dependency barrier.
 
-See the ``Examples of memory barrier sequences'' subsection for diagrams
-showing the ordering constraints.
+See the Section~\ref{sec:advsync:Examples of Memory Barrier Pairings} for
+diagrams showing the ordering constraints.
 
 $\dagger$ Note that the first load really has to have a
 \emph{data} dependency and
 not a control dependency.  If the address for the second load is dependent

advsync/memorybarriers.tex time the barrier completes, the effects of all the stores prior to that · line 1495

Quoted 10 lines
advsync/memorybarriers.tex +3 -3
 on the first load, but the dependency is through a conditional rather than
 actually loading the address itself, then it's a \emph{control} dependency and
-a full read barrier or better is required.  See the ``Control dependencies''
-subsection for more information.
+a full read barrier or better is required.  See the
+Section~\ref{sec:advsync:Control Dependencies} for more information.
 
 $\dagger$ Note that data dependency barriers should normally be paired with
-write barriers; see the ``SMP barrier pairing'' subsection.
+write barriers; see the Section~\ref{sec:advsync:SMP Barrier Pairign}.

The above gets me a LaTeX error, could you please fix and resubmit? It is good practice to verify that it builds beforehand. ;-)

Thanx, Paul

Quoted 16 lines
advsync/memorybarriers.tex +2 -1
 \paragraph{Read Memory Barriers}
 
@@ -1593,7 +1594,8 @@ of the confines of a given architecture:
 \item	There is no guarantee that a CPU will see the correct order
 	of effects from a second CPU's accesses, even \emph{if} the second CPU
 	uses a memory barrier, unless the first CPU \emph{also} uses a matching
-	memory barrier (see the subsection on ``SMP Barrier Pairing'').
+	memory barrier (see the
+	Section~\ref{sec:advsync:SMP Barrier Pairing}).
 \item	There is no guarantee that some intervening piece of off-the-CPU
 	hardware\footnote{
 		This is of concern primarily in operating-system kernels.
Signature · 1 line
1.9.1
#9 lore raw

Re: [PATCH 3/6] advsync: use latex reference feature consistently

Hello,

Quoted 11 lines · Paul E. McKenney
Quoted 8 lines · SeongJae Park

References to other sections in Advanced Synchronization chapter use latex reference feature and section name direct citation inconsistently. Because most other parts are using latex reference feature and it is easier for document maintainance, it would be better to use latex reference feature only. For the reason, this commit enforces latex reference feature to the references.

One issue below, please fix and resubmit.

Sure. I will resubmit in reply to this mail.

Quoted 38 lines
Quoted 38 lines
---
 advsync/memorybarriers.tex | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
advsync/memorybarriers.tex +6 -5
index 15de36a..ee9312d 100644
@@ -1454,7 +1454,8 @@ memory system as time progresses.  All stores before a write barrier will
 occur in the sequence \emph{before} all the stores after the write barrier.
 
 $\dagger$ Note that write barriers should normally be paired with read
-or data dependency barriers; see the ``SMP barrier pairing'' subsection.
+or data dependency barriers; see the
+Section~\ref{sec:advsync:SMP Barrier Pairing}.
 
 \paragraph{Data Dependency Barriers}
 
@@ -1479,19 +1480,19 @@ time the barrier completes, the effects of all the stores prior to that
 touched by the load will be perceptible to any loads issued after the data
 dependency barrier.
 
-See the ``Examples of memory barrier sequences'' subsection for diagrams
-showing the ordering constraints.
+See the Section~\ref{sec:advsync:Examples of Memory Barrier Pairings} for
+diagrams showing the ordering constraints.
 
 $\dagger$ Note that the first load really has to have a
 \emph{data} dependency and
 not a control dependency.  If the address for the second load is dependent
 on the first load, but the dependency is through a conditional rather than
 actually loading the address itself, then it's a \emph{control} dependency and
-a full read barrier or better is required.  See the ``Control dependencies''
-subsection for more information.
+a full read barrier or better is required.  See the
+Section~\ref{sec:advsync:Control Dependencies} for more information.
 
Quoted 6 lines

advsync/memorybarriers.tex time the barrier completes, the effects of all the stores prior to that · line 1495

Quoted 3 lines
advsync/memorybarriers.tex +1 -1
 $\dagger$ Note that data dependency barriers should normally be paired with
-write barriers; see the ``SMP barrier pairing'' subsection.
+write barriers; see the Section~\ref{sec:advsync:SMP Barrier Pairign}.

The above gets me a LaTeX error, could you please fix and resubmit? It is good practice to verify that it builds beforehand. ;-)

Oh, my fault... Sorry and thanks for your kind comment :) I will fix it and resubmit in reply to this mail as soon as possible.

Quoted 21 lines

Thanx, Paul

Quoted 16 lines
advsync/memorybarriers.tex +2 -2
 \paragraph{Read Memory Barriers}
 
@@ -1593,7 +1594,8 @@ of the confines of a given architecture:
 \item	There is no guarantee that a CPU will see the correct order
 	of effects from a second CPU's accesses, even \emph{if} the second CPU
 	uses a memory barrier, unless the first CPU \emph{also} uses a matching
-	memory barrier (see the subsection on ``SMP Barrier Pairing'').
+	memory barrier (see the
+	Section~\ref{sec:advsync:SMP Barrier Pairing}).
 \item	There is no guarantee that some intervening piece of off-the-CPU
 	hardware\footnote{
 		This is of concern primarily in operating-system kernels.
--

1.9.1

#10 lore raw

PATCH 1/1 advsync: use latex reference feature consistently

References to other sections in Advanced Synchronization chapter use latex reference feature and section name direct citation inconsistently. Because most other parts are using latex reference feature and it is easier for document maintainance, it would be better to use latex reference feature only. For the reason, this commit enforces latex reference feature to the references.

---
 advsync/memorybarriers.tex | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
advsync/memorybarriers.tex +9 -7
index 47d910a..3f5c293 100644
@@ -1454,7 +1454,8 @@ memory system as time progresses.  All stores before a write barrier will
 occur in the sequence \emph{before} all the stores after the write barrier.
 
 $\dagger$ Note that write barriers should normally be paired with read
-or data dependency barriers; see the ``SMP barrier pairing'' subsection.
+or data dependency barriers; see the
+Section~\ref{sec:advsync:SMP Barrier Pairing}.
 
 \paragraph{Data Dependency Barriers}
 
@@ -1479,19 +1480,19 @@ time the barrier completes, the effects of all the stores prior to that
 touched by the load will be perceptible to any loads issued after the data
 dependency barrier.
 
-See the ``Examples of memory barrier sequences'' subsection for diagrams
-showing the ordering constraints.
+See the Section~\ref{sec:advsync:Examples of Memory Barrier Pairings} for
+diagrams showing the ordering constraints.
 
 $\dagger$ Note that the first load really has to have a
 \emph{data} dependency and
 not a control dependency.  If the address for the second load is dependent
 on the first load, but the dependency is through a conditional rather than
 actually loading the address itself, then it's a \emph{control} dependency and
-a full read barrier or better is required.  See the ``Control dependencies''
-subsection for more information.
+a full read barrier or better is required.  See the
+Section~\ref{sec:advsync:Control Dependencies} for more information.
 
 $\dagger$ Note that data dependency barriers should normally be paired with
-write barriers; see the ``SMP barrier pairing'' subsection.
+write barriers; see the Section~\ref{sec:advsync:SMP Barrier Pairing}.
 
 \paragraph{Read Memory Barriers}
 
@@ -1593,7 +1594,8 @@ of the confines of a given architecture:
 \item	There is no guarantee that a CPU will see the correct order
 	of effects from a second CPU's accesses, even \emph{if} the second CPU
 	uses a memory barrier, unless the first CPU \emph{also} uses a matching
-	memory barrier (see the subsection on ``SMP Barrier Pairing'').
+	memory barrier (see the
+	Section~\ref{sec:advsync:SMP Barrier Pairing}).
 \item	There is no guarantee that some intervening piece of off-the-CPU
 	hardware\footnote{
 		This is of concern primarily in operating-system kernels.
Signature · 1 line
1.9.1
#11 lore raw

Re: [PATCH] advsync: use latex reference feature consistently

Quoted 8 lines · SeongJae Park

References to other sections in Advanced Synchronization chapter use latex reference feature and section name direct citation inconsistently. Because most other parts are using latex reference feature and it is easier for document maintainance, it would be better to use latex reference feature only. For the reason, this commit enforces latex reference feature to the references.

Queued both, thank you!

Thanx, Paul

Quoted 56 lines
---
 advsync/memorybarriers.tex | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
advsync/memorybarriers.tex +9 -7
index 47d910a..3f5c293 100644
@@ -1454,7 +1454,8 @@ memory system as time progresses.  All stores before a write barrier will
 occur in the sequence \emph{before} all the stores after the write barrier.
 
 $\dagger$ Note that write barriers should normally be paired with read
-or data dependency barriers; see the ``SMP barrier pairing'' subsection.
+or data dependency barriers; see the
+Section~\ref{sec:advsync:SMP Barrier Pairing}.
 
 \paragraph{Data Dependency Barriers}
 
@@ -1479,19 +1480,19 @@ time the barrier completes, the effects of all the stores prior to that
 touched by the load will be perceptible to any loads issued after the data
 dependency barrier.
 
-See the ``Examples of memory barrier sequences'' subsection for diagrams
-showing the ordering constraints.
+See the Section~\ref{sec:advsync:Examples of Memory Barrier Pairings} for
+diagrams showing the ordering constraints.
 
 $\dagger$ Note that the first load really has to have a
 \emph{data} dependency and
 not a control dependency.  If the address for the second load is dependent
 on the first load, but the dependency is through a conditional rather than
 actually loading the address itself, then it's a \emph{control} dependency and
-a full read barrier or better is required.  See the ``Control dependencies''
-subsection for more information.
+a full read barrier or better is required.  See the
+Section~\ref{sec:advsync:Control Dependencies} for more information.
 
 $\dagger$ Note that data dependency barriers should normally be paired with
-write barriers; see the ``SMP barrier pairing'' subsection.
+write barriers; see the Section~\ref{sec:advsync:SMP Barrier Pairing}.
 
 \paragraph{Read Memory Barriers}
 
@@ -1593,7 +1594,8 @@ of the confines of a given architecture:
 \item	There is no guarantee that a CPU will see the correct order
 	of effects from a second CPU's accesses, even \emph{if} the second CPU
 	uses a memory barrier, unless the first CPU \emph{also} uses a matching
-	memory barrier (see the subsection on ``SMP Barrier Pairing'').
+	memory barrier (see the
+	Section~\ref{sec:advsync:SMP Barrier Pairing}).
 \item	There is no guarantee that some intervening piece of off-the-CPU
 	hardware\footnote{
 		This is of concern primarily in operating-system kernels.
Signature · 1 line
1.9.1
#12 lore raw

PATCH 4/6 advsync: fix wrong code example

In reply to SeongJae Park

The code means Y = *(A + 4) but it is written as Y = *A. This commit fixes the typo.

---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +1 -1
index ee9312d..b1f49d3 100644
@@ -1364,7 +1364,7 @@ Y = LOAD *(A + 4); X = LOAD *A;
 \begin{minipage}[t]{\columnwidth}
 \scriptsize
 \begin{verbatim}
-*A = X; Y = *A;
+*A = X; Y = *(A + 4);
 \end{verbatim}
 \end{minipage}
 \vspace{5pt}
Signature · 1 line
1.9.1
#13 lore raw

Re: [PATCH 4/6] advsync: fix wrong code example

Sorry, I missed cc: to the list. Reposting...

Signature · 3 lines
Hi,

2016-04-02 9:28 GMT+09:00 SeongJae Park <[email protected]>:
Quoted 13 lines

The code means Y = *(A + 4) but it is written as Y = *A. This commit fixes the typo.

---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +0 -0
index ee9312d..b1f49d3 100644

advsync/memorybarriers.tex Y = LOAD *(A + 4); X = LOAD *A; · line 1367

Quoted 5 lines
advsync/memorybarriers.tex +1 -1
@@ -1364,7 +1364,7 @@ Y = LOAD *(A + 4); X = LOAD *A;
 \begin{minipage}[t]{\columnwidth}
 \scriptsize
 \begin{verbatim}
-*A = X; Y = *A;
+*A = X; Y = *(A + 4);

I think

+ *A = X; *(A + 4) = Y;

is what meets the possible combination given below.

STORE *A = X; STORE *(A + 4) = Y;
STORE *(A + 4) = Y; STORE *A = X;
STORE {*A, *(A + 4) } = {X, Y};

Regards,

--
Akira Yokosawa <[email protected]>

Quoted 10 lines
advsync/memorybarriers.tex +0 -1
 \end{verbatim}
 \end{minipage}
 \vspace{5pt}
--

1.9.1

--
To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#14 lore raw

Re: [PATCH 4/6] advsync: fix wrong code example

Hi,

Quoted 34 lines · Yokosawa Akira

Sorry, I missed cc: to the list. Reposting...

Signature · 3 lines
Hi,

2016-04-02 9:28 GMT+09:00 SeongJae Park <[email protected]>:
Quoted 13 lines

The code means Y = *(A + 4) but it is written as Y = *A. This commit fixes the typo.

---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +0 -0
index ee9312d..b1f49d3 100644

advsync/memorybarriers.tex Y = LOAD *(A + 4); X = LOAD *A; · line 1367

Quoted 5 lines
advsync/memorybarriers.tex +1 -1
@@ -1364,7 +1364,7 @@ Y = LOAD *(A + 4); X = LOAD *A;
 \begin{minipage}[t]{\columnwidth}
 \scriptsize
 \begin{verbatim}
-*A = X; Y = *A;
+*A = X; Y = *(A + 4);

I think

+ *A = X; *(A + 4) = Y;

is what meets the possible combination given below.

STORE *A = X; STORE *(A + 4) = Y;
STORE *(A + 4) = Y; STORE *A = X;
STORE {*A, *(A + 4) } = {X, Y};

Oops, you're right. Thank you for let me know. I will upload modified version patch soon.

Thanks,
SeongJae Park

Quoted 19 lines

Regards,

--
Akira Yokosawa <[email protected]>

Quoted 10 lines
advsync/memorybarriers.tex +0 -1
 \end{verbatim}
 \end{minipage}
 \vspace{5pt}
--

1.9.1

--
To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#15 lore raw

PATCH 1/1 advsync: fix wrong code example

The code means *(A + 4) = Y but it is written as Y = *A. This commit fixes the typo.

---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +1 -1
index ee9312d..8e9c876 100644
@@ -1364,7 +1364,7 @@ Y = LOAD *(A + 4); X = LOAD *A;
 \begin{minipage}[t]{\columnwidth}
 \scriptsize
 \begin{verbatim}
-*A = X; Y = *A;
+*A = X; *(A + 4) = Y;
 \end{verbatim}
 \end{minipage}
 \vspace{5pt}
Signature · 1 line
1.9.1
#16 lore raw

Re: [PATCH] advsync: fix wrong code example

Oh, You have already added the tag.
Thanks!

2016-04-02 12:03 GMT+09:00 SeongJae Park <[email protected]>:

Quoted 25 lines

The code means *(A + 4) = Y but it is written as Y = *A. This commit fixes the typo.

---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +1 -2
index ee9312d..8e9c876 100644
@@ -1364,7 +1364,7 @@ Y = LOAD *(A + 4); X = LOAD *A;
 \begin{minipage}[t]{\columnwidth}
 \scriptsize
 \begin{verbatim}
-*A = X; Y = *A;
+*A = X; *(A + 4) = Y;
 \end{verbatim}
 \end{minipage}
 \vspace{5pt}
--

1.9.1

#17 lore raw

Re: [PATCH] advsync: fix wrong code example

Quoted 1 line · Yokosawa Akira

Oh, You have already added the tag.

Yes, I think you deserve it, of course. :)

Thanks,
SeongJae Park

Quoted 28 lines

Thanks!

2016-04-02 12:03 GMT+09:00 SeongJae Park <[email protected]>:

Quoted 25 lines

The code means *(A + 4) = Y but it is written as Y = *A. This commit fixes the typo.

---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +1 -2
index ee9312d..8e9c876 100644
@@ -1364,7 +1364,7 @@ Y = LOAD *(A + 4); X = LOAD *A;
 \begin{minipage}[t]{\columnwidth}
 \scriptsize
 \begin{verbatim}
-*A = X; Y = *A;
+*A = X; *(A + 4) = Y;
 \end{verbatim}
 \end{minipage}
 \vspace{5pt}
--

1.9.1

#18 lore raw

Re: [PATCH] advsync: Fix wrong code example

In reply to SeongJae Park
Quoted 5 lines · SeongJae Park

The code means *(A + 4) = Y but it is written as Y = *A. This commit fixes the typo.

Queued, thank you!

Thanx, Paul

Quoted 20 lines
---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +1 -1
index ee9312d..8e9c876 100644
@@ -1364,7 +1364,7 @@ Y = LOAD *(A + 4); X = LOAD *A;
 \begin{minipage}[t]{\columnwidth}
 \scriptsize
 \begin{verbatim}
-*A = X; Y = *A;
+*A = X; *(A + 4) = Y;
 \end{verbatim}
 \end{minipage}
 \vspace{5pt}
Signature · 1 line
1.9.1
#19 lore raw

Re: [PATCH 4/6] advsync: fix wrong code example

In reply to SeongJae Park

If you would like, I don't mind you adding

to the commit log.

Signature · 3 lines
 Akira Yokosawa <[email protected]>

2016-04-02 11:52 GMT+09:00 SeongJae Park <[email protected]>:
Quoted 72 lines

Hi,

Quoted 29 lines · Yokosawa Akira

Sorry, I missed cc: to the list. Reposting...

--
Hi,

2016-04-02 9:28 GMT+09:00 SeongJae Park <[email protected]>:

Quoted 14 lines

The code means Y = *(A + 4) but it is written as Y = *A. This commit fixes the typo.

---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +0 -0
index ee9312d..b1f49d3 100644

advsync/memorybarriers.tex Y = LOAD *(A + 4); X = LOAD *A; · line 1367

Quoted 5 lines
advsync/memorybarriers.tex +1 -1
@@ -1364,7 +1364,7 @@ Y = LOAD *(A + 4); X = LOAD *A;
 \begin{minipage}[t]{\columnwidth}
 \scriptsize
 \begin{verbatim}
-*A = X; Y = *A;
+*A = X; Y = *(A + 4);

I think

Quoted 7 lines

+ *A = X; *(A + 4) = Y;

is what meets the possible combination given below.

STORE *A = X; STORE *(A + 4) = Y;
STORE *(A + 4) = Y; STORE *A = X;
STORE {*A, *(A + 4) } = {X, Y};

Oops, you're right. Thank you for let me know. I will upload modified version patch soon.

Thanks,
SeongJae Park

Quoted 20 lines

Regards,

--
Akira Yokosawa <[email protected]>

Quoted 10 lines
advsync/memorybarriers.tex +0 -1
 \end{verbatim}
 \end{minipage}
 \vspace{5pt}
--

1.9.1

--
To unsubscribe from this list: send the line "unsubscribe perfbook" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#20 lore raw

PATCH 5/6 advsync: fix critical section bleed-in description

In reply to SeongJae Park

A sentence in Locking Examples section says both LOCK and UNLOCK allows preceding operations bleed in to the critical section. However, it's wrong description. LOCK allows only preceding operations and UNLOCK allows only following operations to bleed in. Looks like the wrong description made by just a trivial mistake. This commit fixes the sentence to have correct description.

---
 advsync/memorybarriers.tex | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
advsync/memorybarriers.tex +3 -2
index b1f49d3..1fe0953 100644
@@ -2232,8 +2232,9 @@ might well execute in the following order:
 \end{minipage}
 \vspace{5pt}
 
-Again, always remember that both LOCK and UNLOCK are permitted to let
-preceding operations ``bleed in'' to the critical section.
+Again, always remember that LOCK and UNLOCK are permitted to let preceding
+operations and following operations ``bleed in'' to the critical section
+respectively.
 
 \QuickQuiz{}
 	What sequence of LOCK-UNLOCK operations \emph{would}
Signature · 1 line
1.9.1
#21 lore raw

Re: [PATCH 5/6] advsync: Fix critical section bleed-in description

Quoted 8 lines · SeongJae Park

A sentence in Locking Examples section says both LOCK and UNLOCK allows preceding operations bleed in to the critical section. However, it's wrong description. LOCK allows only preceding operations and UNLOCK allows only following operations to bleed in. Looks like the wrong description made by just a trivial mistake. This commit fixes the sentence to have correct description.

Queued, thank you!

Thanx, Paul

Quoted 23 lines
---
 advsync/memorybarriers.tex | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
advsync/memorybarriers.tex +3 -2
index b1f49d3..1fe0953 100644
@@ -2232,8 +2232,9 @@ might well execute in the following order:
 \end{minipage}
 \vspace{5pt}
 
-Again, always remember that both LOCK and UNLOCK are permitted to let
-preceding operations ``bleed in'' to the critical section.
+Again, always remember that LOCK and UNLOCK are permitted to let preceding
+operations and following operations ``bleed in'' to the critical section
+respectively.
 
 \QuickQuiz{}
 	What sequence of LOCK-UNLOCK operations \emph{would}
Signature · 1 line
1.9.1
#22 lore raw

PATCH 6/6 advsync: fix wrong reference to section ``MMIO write barrier''

In reply to SeongJae Park

A sentence references ``MMIO write barrier'' subsection though the section does not exists. Unfortunately, there is no section for MMIO write barrier though appendix ``Why Memory Barriers?'' says about mmiowb() subtly. For the purpose of the sentence, it could be alternated with reference to ``Device operations'' subsection because it describes about the exceptional case. For the reason, this commit updates it to the reference to ``Device Operations'' subsection.

---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +1 -1
index 1fe0953..b511f51 100644
@@ -1559,7 +1559,7 @@ other strictly in the order specified.
 
 The use of LOCK and UNLOCK operations generally precludes the need for
 other sorts of memory barrier (but note the exceptions mentioned in the
-subsection ``MMIO write barrier'').
+Section~\ref{sec:advsync:Device Operations}).
 
 \QuickQuiz{}
 	What effect does the following sequence have on the
Signature · 1 line
1.9.1
#23 lore raw

Re: [PATCH 6/6] advsync: Fix wrong reference to section ``MMIO write barrier''

Quoted 9 lines · SeongJae Park

A sentence references ``MMIO write barrier'' subsection though the section does not exists. Unfortunately, there is no section for MMIO write barrier though appendix ``Why Memory Barriers?'' says about mmiowb() subtly. For the purpose of the sentence, it could be alternated with reference to ``Device operations'' subsection because it describes about the exceptional case. For the reason, this commit updates it to the reference to ``Device Operations'' subsection.

Queued, thank you!

Thanx, Paul

Quoted 20 lines
---
 advsync/memorybarriers.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
advsync/memorybarriers.tex +1 -1
index 1fe0953..b511f51 100644
@@ -1559,7 +1559,7 @@ other strictly in the order specified.
 
 The use of LOCK and UNLOCK operations generally precludes the need for
 other sorts of memory barrier (but note the exceptions mentioned in the
-subsection ``MMIO write barrier'').
+Section~\ref{sec:advsync:Device Operations}).
 
 \QuickQuiz{}
 	What effect does the following sequence have on the
Signature · 1 line
1.9.1