* [PATCH 0/2] Updates to Chapter memorder
@ 2018-11-04 11:18 Junchang Wang
2018-11-04 11:18 ` [PATCH 1/2] memorder: fix typo Junchang Wang
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Junchang Wang @ 2018-11-04 11:18 UTC (permalink / raw)
To: paulmck, akiyks; +Cc: perfbook, Junchang Wang
Hi Paul and Akira,
I have read through the first half of Chapter memorder, and here is correction
for a few typos. Please take a look.
For the first patch, the last clause I modified still looks confusion to me.
Currently the clause is "though only if both \co{r1} and \co{r3} both end up
containing the address of \co{x}"; however, my understanding is that prior load
or store would also be ordered before the store on line 16, __only if r1 ends up
containing the address of x__. That is, it is not necessary to involve r2/r3. Is
my understanding correct? Or did I miss anything about this in the book?
Thanks,
--Junchang
Junchang Wang (2):
memorder: fix typo
memorybarriercum.svg: fix typo
memorder/memorder.tex | 8 ++++----
memorder/memorybarriercum.svg | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 1/2] memorder: fix typo 2018-11-04 11:18 [PATCH 0/2] Updates to Chapter memorder Junchang Wang @ 2018-11-04 11:18 ` Junchang Wang 2018-11-05 19:45 ` Paul E. McKenney 2018-11-04 11:18 ` [PATCH 2/2] memorybarriercum.svg: " Junchang Wang 2018-11-04 12:04 ` [PATCH 0/2] Updates to Chapter memorder Akira Yokosawa 2 siblings, 1 reply; 9+ messages in thread From: Junchang Wang @ 2018-11-04 11:18 UTC (permalink / raw) To: paulmck, akiyks; +Cc: perfbook, Junchang Wang Fix typos in memorder.tex. Signed-off-by: Junchang Wang <junchangwang@gmail.com> --- memorder/memorder.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/memorder/memorder.tex b/memorder/memorder.tex index 8e11e92..a478f60 100644 --- a/memorder/memorder.tex +++ b/memorder/memorder.tex @@ -1364,7 +1364,7 @@ The head pointer is \co{x1}, which initially references the \co{int} variable \co{y} (line~5), which is in turn initialized to the value $1$ (line~4). \co{P0()} updates head pointer \co{x1} to reference \co{x0} (line~12), -but only afer initializing it to $2$ (line~10) and forcing ordering +but only after initializing it to $2$ (line~10) and forcing ordering (line~11). \co{P1()} picks up the head pointer \co{x1} (line~21), and then loads the referenced value (line~22). @@ -2294,9 +2294,9 @@ These ordering constraints are depicted graphically in Figure~\ref{fig:memorder:Cumulativity}. Note also that cumulativity is not limited to a single step back in time. If there was another load from \co{x} or store to \co{x} from any thread -that came before the store on line~13, that prior load or store would also -be ordered before the store on line~32, though only if both \co{r1} and -\co{r2} both end up containing the address of \co{x}. +that came before the store on line~8, that prior load or store would also +be ordered before the store on line~16, though only if both \co{r1} and +\co{r3} both end up containing the address of \co{x}. In short, use of cumulative ordering operations can suppress non-multicopy-atomic behaviors in some situations. -- 2.7.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] memorder: fix typo 2018-11-04 11:18 ` [PATCH 1/2] memorder: fix typo Junchang Wang @ 2018-11-05 19:45 ` Paul E. McKenney 2018-11-06 6:15 ` Junchang Wang 0 siblings, 1 reply; 9+ messages in thread From: Paul E. McKenney @ 2018-11-05 19:45 UTC (permalink / raw) To: Junchang Wang; +Cc: akiyks, perfbook On Sun, Nov 04, 2018 at 07:18:38PM +0800, Junchang Wang wrote: > Fix typos in memorder.tex. > > Signed-off-by: Junchang Wang <junchangwang@gmail.com> You know, I have no idea what litmus test I was describing in that paragraph, but it certainly wasn't the one in Listing 15.17. :-/ I adjusted things a bit more, so please see below and let me know if I messed anything up. Thanx, Paul ------------------------------------------------------------------------ commit 73f0f6583b154f2cd9280f321e87dcaabe6b1221 Author: Junchang Wang <junchangwang@gmail.com> Date: Sun Nov 4 19:18:38 2018 +0800 memorder: Fix typo Fix typos in memorder.tex, including a very confused paragraph that seems to be referring to some prior version of Listing 15.17. Signed-off-by: Junchang Wang <junchangwang@gmail.com> [ paulmck: Adjusted rewording of Listing 15.17 discussion. ] Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com> diff --git a/memorder/memorder.tex b/memorder/memorder.tex index 8e11e92153e0..5e74a912e15d 100644 --- a/memorder/memorder.tex +++ b/memorder/memorder.tex @@ -1364,7 +1364,7 @@ The head pointer is \co{x1}, which initially references the \co{int} variable \co{y} (line~5), which is in turn initialized to the value $1$ (line~4). \co{P0()} updates head pointer \co{x1} to reference \co{x0} (line~12), -but only afer initializing it to $2$ (line~10) and forcing ordering +but only after initializing it to $2$ (line~10) and forcing ordering (line~11). \co{P1()} picks up the head pointer \co{x1} (line~21), and then loads the referenced value (line~22). @@ -2294,9 +2294,9 @@ These ordering constraints are depicted graphically in Figure~\ref{fig:memorder:Cumulativity}. Note also that cumulativity is not limited to a single step back in time. If there was another load from \co{x} or store to \co{x} from any thread -that came before the store on line~13, that prior load or store would also -be ordered before the store on line~32, though only if both \co{r1} and -\co{r2} both end up containing the address of \co{x}. +that came before the store on line~8, that prior load or store would also +be ordered before the load on line~25, though only if both \co{r1} and +\co{r2} both end up containing the value \co{1}. In short, use of cumulative ordering operations can suppress non-multicopy-atomic behaviors in some situations. ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] memorder: fix typo 2018-11-05 19:45 ` Paul E. McKenney @ 2018-11-06 6:15 ` Junchang Wang 0 siblings, 0 replies; 9+ messages in thread From: Junchang Wang @ 2018-11-06 6:15 UTC (permalink / raw) To: Paul McKenney; +Cc: Akira Yokosawa, perfbook On Tue, Nov 6, 2018 at 3:45 AM Paul E. McKenney <paulmck@linux.ibm.com> wrote: > > On Sun, Nov 04, 2018 at 07:18:38PM +0800, Junchang Wang wrote: > > Fix typos in memorder.tex. > > > > Signed-off-by: Junchang Wang <junchangwang@gmail.com> > > You know, I have no idea what litmus test I was describing in that > paragraph, but it certainly wasn't the one in Listing 15.17. :-/ > > I adjusted things a bit more, so please see below and let me know if > I messed anything up. > > Thanx, Paul > > ------------------------------------------------------------------------ > > commit 73f0f6583b154f2cd9280f321e87dcaabe6b1221 > Author: Junchang Wang <junchangwang@gmail.com> > Date: Sun Nov 4 19:18:38 2018 +0800 > > memorder: Fix typo > > Fix typos in memorder.tex, including a very confused paragraph that > seems to be referring to some prior version of Listing 15.17. > > Signed-off-by: Junchang Wang <junchangwang@gmail.com> > [ paulmck: Adjusted rewording of Listing 15.17 discussion. ] > Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com> > > diff --git a/memorder/memorder.tex b/memorder/memorder.tex > index 8e11e92153e0..5e74a912e15d 100644 > --- a/memorder/memorder.tex > +++ b/memorder/memorder.tex > @@ -1364,7 +1364,7 @@ The head pointer is \co{x1}, which initially > references the \co{int} variable \co{y} (line~5), which is in turn > initialized to the value $1$ (line~4). > \co{P0()} updates head pointer \co{x1} to reference \co{x0} (line~12), > -but only afer initializing it to $2$ (line~10) and forcing ordering > +but only after initializing it to $2$ (line~10) and forcing ordering > (line~11). > \co{P1()} picks up the head pointer \co{x1} (line~21), and then loads > the referenced value (line~22). > @@ -2294,9 +2294,9 @@ These ordering constraints are depicted graphically in > Figure~\ref{fig:memorder:Cumulativity}. > Note also that cumulativity is not limited to a single step back in time. > If there was another load from \co{x} or store to \co{x} from any thread > -that came before the store on line~13, that prior load or store would also > -be ordered before the store on line~32, though only if both \co{r1} and > -\co{r2} both end up containing the address of \co{x}. > +that came before the store on line~8, that prior load or store would also > +be ordered before the load on line~25, though only if both \co{r1} and > +\co{r2} both end up containing the value \co{1}. > Hi Paul, Now the discussion is pretty clear to me. Thanks a lot. Regards, --Junchang > In short, use of cumulative ordering operations can suppress > non-multicopy-atomic behaviors in some situations. > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] memorybarriercum.svg: fix typo 2018-11-04 11:18 [PATCH 0/2] Updates to Chapter memorder Junchang Wang 2018-11-04 11:18 ` [PATCH 1/2] memorder: fix typo Junchang Wang @ 2018-11-04 11:18 ` Junchang Wang 2018-11-05 19:48 ` Paul E. McKenney 2018-11-04 12:04 ` [PATCH 0/2] Updates to Chapter memorder Akira Yokosawa 2 siblings, 1 reply; 9+ messages in thread From: Junchang Wang @ 2018-11-04 11:18 UTC (permalink / raw) To: paulmck, akiyks; +Cc: perfbook, Junchang Wang Fix typo in memorybarriercum.svg. Signed-off-by: Junchang Wang <junchangwang@gmail.com> --- memorder/memorybarriercum.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memorder/memorybarriercum.svg b/memorder/memorybarriercum.svg index ac9e5cf..71b69a5 100644 --- a/memorder/memorybarriercum.svg +++ b/memorder/memorybarriercum.svg @@ -212,7 +212,7 @@ id="tspan5462-5" y="-981.5686" x="-13.718384" - sodipodi:role="line">... cumulativity guarantees CPU 0's store before CPU 2's store</tspan></text> + sodipodi:role="line">... cumulativity guarantees CPU 0's store before CPU 1's store</tspan></text> </g> <g transform="translate(0,53.92809)" -- 2.7.4 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] memorybarriercum.svg: fix typo 2018-11-04 11:18 ` [PATCH 2/2] memorybarriercum.svg: " Junchang Wang @ 2018-11-05 19:48 ` Paul E. McKenney 0 siblings, 0 replies; 9+ messages in thread From: Paul E. McKenney @ 2018-11-05 19:48 UTC (permalink / raw) To: Junchang Wang; +Cc: akiyks, perfbook On Sun, Nov 04, 2018 at 07:18:39PM +0800, Junchang Wang wrote: > Fix typo in memorybarriercum.svg. > > Signed-off-by: Junchang Wang <junchangwang@gmail.com> Good catch, applied and queued, thank you! Thanx, Paul > --- > memorder/memorybarriercum.svg | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/memorder/memorybarriercum.svg b/memorder/memorybarriercum.svg > index ac9e5cf..71b69a5 100644 > --- a/memorder/memorybarriercum.svg > +++ b/memorder/memorybarriercum.svg > @@ -212,7 +212,7 @@ > id="tspan5462-5" > y="-981.5686" > x="-13.718384" > - sodipodi:role="line">... cumulativity guarantees CPU 0's store before CPU 2's store</tspan></text> > + sodipodi:role="line">... cumulativity guarantees CPU 0's store before CPU 1's store</tspan></text> > </g> > <g > transform="translate(0,53.92809)" > -- > 2.7.4 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] Updates to Chapter memorder 2018-11-04 11:18 [PATCH 0/2] Updates to Chapter memorder Junchang Wang 2018-11-04 11:18 ` [PATCH 1/2] memorder: fix typo Junchang Wang 2018-11-04 11:18 ` [PATCH 2/2] memorybarriercum.svg: " Junchang Wang @ 2018-11-04 12:04 ` Akira Yokosawa 2018-11-05 19:50 ` Paul E. McKenney 2 siblings, 1 reply; 9+ messages in thread From: Akira Yokosawa @ 2018-11-04 12:04 UTC (permalink / raw) To: Junchang Wang, paulmck; +Cc: perfbook On 2018/11/04 19:18:37 +0800, Junchang Wang wrote: > Hi Paul and Akira, > > I have read through the first half of Chapter memorder, and here is correction > for a few typos. Please take a look. > > For the first patch, the last clause I modified still looks confusion to me. > Currently the clause is "though only if both \co{r1} and \co{r3} both end up > containing the address of \co{x}"; however, my understanding is that prior load > or store would also be ordered before the store on line 16, __only if r1 ends up > containing the address of x__. That is, it is not necessary to involve r2/r3. Is > my understanding correct? Or did I miss anything about this in the book? Going back to commit 43236beadb19 ("memorder: Expand on cumulativity and {other,} multicopy atomicity"), this paragraph discussed Listing 14.17 at the time (WWC Litmus Test With Release), which is a different litmus test than the current Listing 15.17 (WRC Litmus Test With Release). Still line 32 of then Listing 14.17 was an "exists" clause. No wonder you can't figure out what is discussed there. Paul, can you look into this? Thanks, Akira > > > Thanks, > --Junchang > > Junchang Wang (2): > memorder: fix typo > memorybarriercum.svg: fix typo > > memorder/memorder.tex | 8 ++++---- > memorder/memorybarriercum.svg | 2 +- > 2 files changed, 5 insertions(+), 5 deletions(-) > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] Updates to Chapter memorder 2018-11-04 12:04 ` [PATCH 0/2] Updates to Chapter memorder Akira Yokosawa @ 2018-11-05 19:50 ` Paul E. McKenney 2018-11-06 6:18 ` Junchang Wang 0 siblings, 1 reply; 9+ messages in thread From: Paul E. McKenney @ 2018-11-05 19:50 UTC (permalink / raw) To: Akira Yokosawa; +Cc: Junchang Wang, perfbook On Sun, Nov 04, 2018 at 09:04:28PM +0900, Akira Yokosawa wrote: > On 2018/11/04 19:18:37 +0800, Junchang Wang wrote: > > Hi Paul and Akira, > > > > I have read through the first half of Chapter memorder, and here is correction > > for a few typos. Please take a look. > > > > For the first patch, the last clause I modified still looks confusion to me. > > Currently the clause is "though only if both \co{r1} and \co{r3} both end up > > containing the address of \co{x}"; however, my understanding is that prior load > > or store would also be ordered before the store on line 16, __only if r1 ends up > > containing the address of x__. That is, it is not necessary to involve r2/r3. Is > > my understanding correct? Or did I miss anything about this in the book? > > Going back to commit 43236beadb19 ("memorder: Expand on cumulativity and > {other,} multicopy atomicity"), this paragraph discussed Listing 14.17 > at the time (WWC Litmus Test With Release), which is a different litmus > test than the current Listing 15.17 (WRC Litmus Test With Release). > Still line 32 of then Listing 14.17 was an "exists" clause. > No wonder you can't figure out what is discussed there. > > Paul, can you look into this? Indeed, this was quite the mess! Hopefully now fixed. ;-) Thanx, Paul > Thanks, Akira > > > > > > > Thanks, > > --Junchang > > > > Junchang Wang (2): > > memorder: fix typo > > memorybarriercum.svg: fix typo > > > > memorder/memorder.tex | 8 ++++---- > > memorder/memorybarriercum.svg | 2 +- > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/2] Updates to Chapter memorder 2018-11-05 19:50 ` Paul E. McKenney @ 2018-11-06 6:18 ` Junchang Wang 0 siblings, 0 replies; 9+ messages in thread From: Junchang Wang @ 2018-11-06 6:18 UTC (permalink / raw) To: Paul McKenney, Akira Yokosawa; +Cc: perfbook On Tue, Nov 6, 2018 at 3:51 AM Paul E. McKenney <paulmck@linux.ibm.com> wrote: > > On Sun, Nov 04, 2018 at 09:04:28PM +0900, Akira Yokosawa wrote: > > On 2018/11/04 19:18:37 +0800, Junchang Wang wrote: > > > Hi Paul and Akira, > > > > > > I have read through the first half of Chapter memorder, and here is correction > > > for a few typos. Please take a look. > > > > > > For the first patch, the last clause I modified still looks confusion to me. > > > Currently the clause is "though only if both \co{r1} and \co{r3} both end up > > > containing the address of \co{x}"; however, my understanding is that prior load > > > or store would also be ordered before the store on line 16, __only if r1 ends up > > > containing the address of x__. That is, it is not necessary to involve r2/r3. Is > > > my understanding correct? Or did I miss anything about this in the book? > > > > Going back to commit 43236beadb19 ("memorder: Expand on cumulativity and > > {other,} multicopy atomicity"), this paragraph discussed Listing 14.17 > > at the time (WWC Litmus Test With Release), which is a different litmus > > test than the current Listing 15.17 (WRC Litmus Test With Release). > > Still line 32 of then Listing 14.17 was an "exists" clause. > > No wonder you can't figure out what is discussed there. > > > > Paul, can you look into this? > > Indeed, this was quite the mess! Hopefully now fixed. ;-) > Great! Thanks to both of you :-). Cheers, --Junchang > Thanx, Paul > > > Thanks, Akira > > > > > > > > > > > Thanks, > > > --Junchang > > > > > > Junchang Wang (2): > > > memorder: fix typo > > > memorybarriercum.svg: fix typo > > > > > > memorder/memorder.tex | 8 ++++---- > > > memorder/memorybarriercum.svg | 2 +- > > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > > > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-11-06 6:18 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-11-04 11:18 [PATCH 0/2] Updates to Chapter memorder Junchang Wang 2018-11-04 11:18 ` [PATCH 1/2] memorder: fix typo Junchang Wang 2018-11-05 19:45 ` Paul E. McKenney 2018-11-06 6:15 ` Junchang Wang 2018-11-04 11:18 ` [PATCH 2/2] memorybarriercum.svg: " Junchang Wang 2018-11-05 19:48 ` Paul E. McKenney 2018-11-04 12:04 ` [PATCH 0/2] Updates to Chapter memorder Akira Yokosawa 2018-11-05 19:50 ` Paul E. McKenney 2018-11-06 6:18 ` Junchang Wang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox