Question about Table E.1
Hello Paul,
I have been reading the book, until I stumbled on Quick Quiz 3.7, Table E.1: Performance of Synchronization Mechanisms
on 16-CPU 2.8 GHz Intel X5550 (Nehalem) System
<Copying from source, since the PDF is a little tricky>
The first part looks like:
Clock period & 0.4 & 1.0 \\
Same-CPU CAS & 12.2 & 33.8 \\
Same-CPU lock & 25.6 & 71.2 \\
Blind CAS & 12.9 & 35.8 \\
CAS & 7.0 & 19.4 \\In this case, what would be the last lines "Blind CAS" and "CAS" referring to ?
(For a second I thought it could be "In-Core Blind CAS" and "In-Core CAS" like in Table 3.1, but that would not make sense: This "CAS" is faster than the previous "Same-CPU CAS". )
Thanks for reading,
Leo
Quoted 16 lines · Leonardo Brás
Hello Paul,
I have been reading the book, until I stumbled on Quick Quiz 3.7, Table E.1: Performance of Synchronization Mechanisms
on 16-CPU 2.8 GHz Intel X5550 (Nehalem) System<Copying from source, since the PDF is a little tricky>
The first part looks like:
Clock period & 0.4 & 1.0 \\ Same-CPU CAS & 12.2 & 33.8 \\ Same-CPU lock & 25.6 & 71.2 \\ Blind CAS & 12.9 & 35.8 \\ CAS & 7.0 & 19.4 \\
Quoted 5 lines
In this case, what would be the last lines "Blind CAS" and "CAS" referring to ?
(For a second I thought it could be "In-Core Blind CAS" and "In-Core CAS" like in Table 3.1, but that would not make sense: This "CAS" is faster than the previous "Same-CPU CAS". )
I was surprised myself, but those measurements are quite real. My best guess is that the two threads in the core are able to overlap their accesses, while the single CPU must do everything sequentially.
Strange, but whatever the reason, true! ;-)
Thanx, Paul
Quoted 23 lines · Paul E. McKenney
Quoted 16 lines · Leonardo Brás
Hello Paul,
I have been reading the book, until I stumbled on Quick Quiz 3.7, Table E.1: Performance of Synchronization Mechanisms
on 16-CPU 2.8 GHz Intel X5550 (Nehalem) System<Copying from source, since the PDF is a little tricky>
The first part looks like:
Clock period & 0.4 & 1.0 \\ Same-CPU CAS & 12.2 & 33.8 \\ Same-CPU lock & 25.6 & 71.2 \\ Blind CAS & 12.9 & 35.8 \\ CAS & 7.0 & 19.4 \\Quoted 5 lines
In this case, what would be the last lines "Blind CAS" and "CAS" referring to ?
(For a second I thought it could be "In-Core Blind CAS" and "In-Core CAS" like in Table 3.1, but that would not make sense: This "CAS" is faster than the previous "Same-CPU CAS". )
Quoted 5 lines
I was surprised myself, but those measurements are quite real. My best guess is that the two threads in the core are able to overlap their accesses, while the single CPU must do everything sequentially.
Strange, but whatever the reason, true! ;-)
Yeah, even more strange is that in this case Blind CAS was actually slower than CAS. Anyway, your suggestion on overlapping accesses make sense.
I want to suggest a change, but it's easier to discuss this over a patch.
Quoted 2 lines
Thanx, Paul
Thank you!
Leo
Quoted 19 lines · Paul E. McKenney
Quoted 18 lines · Leonardo Brás
Hello Paul,
I have been reading the book, until I stumbled on Quick Quiz 3.7, Table E.1: Performance of Synchronization Mechanisms
on 16-CPU 2.8 GHz Intel X5550 (Nehalem) System<Copying from source, since the PDF is a little tricky>
The first part looks like:
Clock period & 0.4 & 1.0 \\ Same-CPU CAS & 12.2 & 33.8 \\ Same-CPU lock & 25.6 & 71.2 \\ Blind CAS & 12.9 & 35.8 \\ CAS & 7.0 & 19.4 \\In this case, what would be the last lines "Blind CAS" and "CAS" referring to ?
Quoted 7 lines
Quoted 3 lines
(For a second I thought it could be "In-Core Blind CAS" and "In-Core CAS" like in Table 3.1, but that would not make sense: This "CAS" is faster than the previous "Same-CPU CAS". )
I was surprised myself, but those measurements are quite real. My best guess is that the two threads in the core are able to overlap their accesses, while the single CPU must do everything sequentially.
IMHO This phrase would look great as a footnote for this page, clearing any question like mine. What do you think about it?
Quoted 4 lines
Strange, but whatever the reason, true! ;-)
Thanx, Paul
Hi,
Quoted 19 lines · Paul E. McKenney
Quoted 18 lines · Leonardo Brás
Hello Paul,
I have been reading the book, until I stumbled on Quick Quiz 3.7, Table E.1: Performance of Synchronization Mechanisms
on 16-CPU 2.8 GHz Intel X5550 (Nehalem) System<Copying from source, since the PDF is a little tricky>
The first part looks like:
Clock period & 0.4 & 1.0 \\ Same-CPU CAS & 12.2 & 33.8 \\ Same-CPU lock & 25.6 & 71.2 \\ Blind CAS & 12.9 & 35.8 \\ CAS & 7.0 & 19.4 \\In this case, what would be the last lines "Blind CAS" and "CAS" referring to ?
Quoted 7 lines
Quoted 3 lines
(For a second I thought it could be "In-Core Blind CAS" and "In-Core CAS" like in Table 3.1, but that would not make sense: This "CAS" is faster than the previous "Same-CPU CAS". )
I was surprised myself, but those measurements are quite real. My best guess is that the two threads in the core are able to overlap their accesses, while the single CPU must do everything sequentially.
Paul, do you remember how you obtained the data set? There are several data sets under CodeSamples/cpu/data/, but I don't see the one corresponds to the table.
The code for collecting these data was added in CodeSamples/cpu/ by commit 81989d7483e2 ("cpu: Reproduce the old cache-to-cache latency measurement code") in 2020. And the next commit 2fc05ca07edc ("api-pthreads.h: Use clock_gettime() and check sched_setaffinity()") improved the stability of reproduced code.
This table was first added in commit 38fd945ff401 ("Fill out CPU chapter, including adding Nehalem data.") in 2009.
The data have never been updated since.
I'm kind of suspecting the "7.0 us" which surprised you at the time might have been an outlier due to some disturbance discussed in Appendix A.3 "What Time Is It?".
I'm not sure, just guessing...
Thanks, Akira
Quoted 4 lines
Strange, but whatever the reason, true! ;-)
Thanx, Paul
Quoted 40 lines · Akira Yokosawa
Hi,
Quoted 19 lines · Paul E. McKenney
Quoted 18 lines · Leonardo Brás
Hello Paul,
I have been reading the book, until I stumbled on Quick Quiz 3.7, Table E.1: Performance of Synchronization Mechanisms
on 16-CPU 2.8 GHz Intel X5550 (Nehalem) System<Copying from source, since the PDF is a little tricky>
The first part looks like:
Clock period & 0.4 & 1.0 \\ Same-CPU CAS & 12.2 & 33.8 \\ Same-CPU lock & 25.6 & 71.2 \\ Blind CAS & 12.9 & 35.8 \\ CAS & 7.0 & 19.4 \\In this case, what would be the last lines "Blind CAS" and "CAS" referring to ?
Quoted 7 lines
Quoted 3 lines
(For a second I thought it could be "In-Core Blind CAS" and "In-Core CAS" like in Table 3.1, but that would not make sense: This "CAS" is faster than the previous "Same-CPU CAS". )
I was surprised myself, but those measurements are quite real. My best guess is that the two threads in the core are able to overlap their accesses, while the single CPU must do everything sequentially.
Paul, do you remember how you obtained the data set? There are several data sets under CodeSamples/cpu/data/, but I don't see the one corresponds to the table.
The code for collecting these data was added in CodeSamples/cpu/ by commit
81989d7483e2("cpu: Reproduce the old cache-to-cache latency measurement code") in 2020. And the next commit2fc05ca07edc("api-pthreads.h: Useclock_gettime()and checksched_setaffinity()") improved the stability of reproduced code.
Quoted 5 lines
This table was first added in commit
38fd945ff401("Fill out CPU chapter, including adding Nehalem data.") in 2009.
The data have never been updated since.I'm kind of suspecting the "7.0 us" which surprised you at the time
I mean, "7.0 ns"
Thanks, Akira
Quoted 11 lines
might have been an outlier due to some disturbance discussed in Appendix A.3 "What Time Is It?".
I'm not sure, just guessing...
Thanks, Akira
Quoted 4 lines
Strange, but whatever the reason, true! ;-)
Thanx, Paul
Quoted 41 lines · Akira Yokosawa
Quoted 40 lines · Akira Yokosawa
Hi,
Quoted 19 lines · Paul E. McKenney
Quoted 18 lines · Leonardo Brás
Hello Paul,
I have been reading the book, until I stumbled on Quick Quiz 3.7, Table E.1: Performance of Synchronization Mechanisms
on 16-CPU 2.8 GHz Intel X5550 (Nehalem) System<Copying from source, since the PDF is a little tricky>
The first part looks like:
Clock period & 0.4 & 1.0 \\ Same-CPU CAS & 12.2 & 33.8 \\ Same-CPU lock & 25.6 & 71.2 \\ Blind CAS & 12.9 & 35.8 \\ CAS & 7.0 & 19.4 \\In this case, what would be the last lines "Blind CAS" and "CAS" referring to ?
Quoted 7 lines
Quoted 3 lines
(For a second I thought it could be "In-Core Blind CAS" and "In-Core CAS" like in Table 3.1, but that would not make sense: This "CAS" is faster than the previous "Same-CPU CAS". )
I was surprised myself, but those measurements are quite real. My best guess is that the two threads in the core are able to overlap their accesses, while the single CPU must do everything sequentially.
Paul, do you remember how you obtained the data set? There are several data sets under CodeSamples/cpu/data/, but I don't see the one corresponds to the table.
The code for collecting these data was added in CodeSamples/cpu/ by commit
81989d7483e2("cpu: Reproduce the old cache-to-cache latency measurement code") in 2020. And the next commit2fc05ca07edc("api-pthreads.h: Useclock_gettime()and checksched_setaffinity()") improved the stability of reproduced code.
Quoted 13 lines
Quoted 5 lines
This table was first added in commit
38fd945ff401("Fill out CPU chapter, including adding Nehalem data.") in 2009.
The data have never been updated since.I'm kind of suspecting the "7.0 us" which surprised you at the time
I mean, "7.0 ns"
Thanks, Akira
Quoted 4 lines
might have been an outlier due to some disturbance discussed in Appendix A.3 "What Time Is It?".
I'm not sure, just guessing...
My surprise caused me to beat on it, and it was persistent.
But I cannot find the raw data, either, so maybe I should delete that table. Though I really do like the fact that it is surprising, based on a hope that it convinces readers to expect the unexpected.
Thanx, Paul
Quoted 6 lines
Quoted 6 lines
Thanks, Akira
Quoted 4 lines
Strange, but whatever the reason, true! ;-)
Thanx, Paul
Quoted 49 lines · Paul E. McKenney
Quoted 48 lines · Akira Yokosawa
Quoted 40 lines · Akira Yokosawa
Hi,
Quoted 19 lines · Paul E. McKenney
Quoted 18 lines · Leonardo Brás
Hello Paul,
I have been reading the book, until I stumbled on Quick Quiz 3.7, Table E.1: Performance of Synchronization Mechanisms
on 16-CPU 2.8 GHz Intel X5550 (Nehalem) System<Copying from source, since the PDF is a little tricky>
The first part looks like:
Clock period & 0.4 & 1.0 \\ Same-CPU CAS & 12.2 & 33.8 \\ Same-CPU lock & 25.6 & 71.2 \\ Blind CAS & 12.9 & 35.8 \\ CAS & 7.0 & 19.4 \\In this case, what would be the last lines "Blind CAS" and "CAS" referring to ?
Quoted 7 lines
Quoted 3 lines
(For a second I thought it could be "In-Core Blind CAS" and "In-Core CAS" like in Table 3.1, but that would not make sense: This "CAS" is faster than the previous "Same-CPU CAS". )
I was surprised myself, but those measurements are quite real. My best guess is that the two threads in the core are able to overlap their accesses, while the single CPU must do everything sequentially.
Paul, do you remember how you obtained the data set? There are several data sets under CodeSamples/cpu/data/, but I don't see the one corresponds to the table.
The code for collecting these data was added in CodeSamples/cpu/ by commit
81989d7483e2("cpu: Reproduce the old cache-to-cache latency measurement code") in 2020. And the next commit2fc05ca07edc("api-pthreads.h: Useclock_gettime()and checksched_setaffinity()") improved the stability of reproduced code.Quoted 5 lines
This table was first added in commit
38fd945ff401("Fill out CPU chapter, including adding Nehalem data.") in 2009.
The data have never been updated since.I'm kind of suspecting the "7.0 us" which surprised you at the time
I mean, "7.0 ns"
Quoted 8 lines
Quoted 6 lines
Thanks, Akira
Quoted 4 lines
might have been an outlier due to some disturbance discussed in Appendix A.3 "What Time Is It?".
I'm not sure, just guessing...
My surprise caused me to beat on it, and it was persistent.
I see. So the "outlier" was the microarchitecture of that X5550 (Nehalem), I guess.
I'd love to reproduce the behavior if at all possible.
Quoted 4 lines
But I cannot find the raw data, either, so maybe I should delete that table. Though I really do like the fact that it is surprising, based on a hope that it convinces readers to expect the unexpected.
That episode would be a good Quick Quiz if the Answer to QQz could have a nested QQz inside it.
Unfortunately that is not possible...
Thanks, Akira
Quoted 9 lines
Thanx, Paul
Quoted 6 lines
Quoted 6 lines
Thanks, Akira
Quoted 4 lines
Strange, but whatever the reason, true! ;-)
Thanx, Paul
Quoted 8 lines · Akira Yokosawa
Quoted 1 line · Paul E. McKenney
My surprise caused me to beat on it, and it was persistent.
I see. So the "outlier" was the microarchitecture of that X5550 (Nehalem), I guess.
I'd love to reproduce the behavior if at all possible.Quoted 1 line
Quoted 7 lines
Quoted 3 lines
But I cannot find the raw data, either, so maybe I should delete that table. Though I really do like the fact that it is surprising, based on a hope that it convinces readers to expect the unexpected.
That episode would be a good Quick Quiz if the Answer to QQz could have a nested QQz inside it.
Unfortunately that is not possible...
On second thought, it should be possible to put a QQz next to QQz 3.7 citing Table E.1 in the Quiz part.
Let me try and produce a PoC patch.
Thanks, Akira
Quoted 12 lines
Thanks, Akira
Quoted 9 lines
Thanx, Paul
Quoted 6 lines
Quoted 6 lines
Thanks, Akira
Quoted 4 lines
Strange, but whatever the reason, true! ;-)
Thanx, Paul
PATCH 1/1 cpu: PoC of A QQz citing table in answer to another QQz (was Re: Question about Table E.1)
Subject: [PATCH -perfbook] cpu: Add a QQz citing table E.1
An email thread started from a question from Leo [1] stimulated me to add a QQz on Paul's experience back in 2009.
---
Quoted 4 lines · I wrote:
On second thought, it should be possible to put a QQz next to QQz 3.7 citing Table E.1 in the Quiz part.
Let me try and produce a PoC patch.
Something like this?
I couldn't make the QQz next to QQz 3.7 due to the
\QuickQuizLabel{\QspeedOfLightAtoms}
just below QQz 3.7.
If you put the label in the middle of
\QuickQuizSeries{
...
}
, you will get build errors in -nq builds.
Instead, I added it next to QQz 3.8 (or the end of Section 3.2.2). It looks still relevant there.
The wording of the Quiz and its Answer is just a stub. Paul, feel free to rewrite them as you like.
Thanks, Akira
--
cpu/overheads.tex | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-)
cpu/overheads.tex +21 -3
@@ -485,10 +485,11 @@ cycles, as shown in the ``Global Comms'' row. % page 6/76 'Leading Interconnect, Leading Performance' % Needs updating... -\QuickQuiz{ +\QuickQuizSeries{% +\QuickQuizB{ These numbers are insanely large! How can I possibly get my head around them? -}\QuickQuizAnswer{ +}\QuickQuizAnswerB{ Get a roll of toilet paper. In the USA, each roll will normally have somewhere around 350--500 sheets.
@@ -516,7 +517,24 @@ cycles, as shown in the ``Global Comms'' row. You might wish to avoid disabling interrupts across that many cache misses.\footnote{ Kudos to Matthew Wilcox for this holding-breath analogy.} -}\QuickQuizEnd +}\QuickQuizEndB +% +\QuickQuizE{ + \Cref{tab:cpu:Performance of Synchronization Mechanisms on 16-CPU 2.8GHz Intel X5550 (Nehalem) System} + in the answer to \QuickQuizARef{\QspeedOfLightAtoms} says that + In-Core CAS is faster than both of Same-CPU CAS and In-Core Blind CAS\@. + What is happening there? +}\QuickQuizAnswerE{ + I \emph{was} surprised by the data I obtained and did a rigorous + check of their validity. + I got the same result persistently. + One theory that might explain the observation would be: + The two threads in the core are able to overlap their accesses, + while the single CPU must do everything sequentially. + Unfortunately, there seems to be no public documentation explaining + why the Intel X5550 (Nehalem) system behaved like that. +}\QuickQuizEndE +} % End of \QuickQuizSeries \subsection{Hardware Optimizations} \label{sec:cpu:Hardware Optimizations}
base-commit: 14440e232cc1b2580dc1a73f873dc29fe3aea02b
Signature · 1 line
2.25.1
Re: [PATCH -perfbook] cpu: PoC of A QQz citing table in answer to another QQz (was Re: Question about Table E.1)
Quoted 85 lines · Akira Yokosawa
Subject: [PATCH -perfbook] cpu: Add a QQz citing table E.1
An email thread started from a question from Leo [1] stimulated me to add a QQz on Paul's experience back in 2009.
Signed-off-by Akira Yokosawa <[email protected]>---
Quoted 4 lines · I wrote:
On second thought, it should be possible to put a QQz next to QQz 3.7 citing Table E.1 in the Quiz part.
Let me try and produce a PoC patch.
Something like this?
I couldn't make the QQz next to QQz 3.7 due to the
\QuickQuizLabel{\QspeedOfLightAtoms}
just below QQz 3.7.
If you put the label in the middle of\QuickQuizSeries{
...
}, you will get build errors in -nq builds.
Instead, I added it next to QQz 3.8 (or the end of Section 3.2.2). It looks still relevant there.
The wording of the Quiz and its Answer is just a stub. Paul, feel free to rewrite them as you like.
Thanks, Akira
--cpu/overheads.tex | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-)cpu/overheads.tex +21
-3@@ -485,10 +485,11 @@ cycles, as shown in the ``Global Comms'' row. % page 6/76 'Leading Interconnect, Leading Performance' % Needs updating... -\QuickQuiz{ +\QuickQuizSeries{% +\QuickQuizB{ These numbers are insanely large! How can I possibly get my head around them? -}\QuickQuizAnswer{ +}\QuickQuizAnswerB{ Get a roll of toilet paper. In the USA, each roll will normally have somewhere around 350--500 sheets.@@ -516,7 +517,24 @@ cycles, as shown in the ``Global Comms'' row. You might wish to avoid disabling interrupts across that many cache misses.\footnote{ Kudos to Matthew Wilcox for this holding-breath analogy.} -}\QuickQuizEnd +}\QuickQuizEndB +% +\QuickQuizE{ + \Cref{tab:cpu:Performance of Synchronization Mechanisms on 16-CPU 2.8GHz Intel X5550 (Nehalem) System} + in the answer to \QuickQuizARef{\QspeedOfLightAtoms} says that + In-Core CAS is faster than both of Same-CPU CAS and In-Core Blind CAS\@. + What is happening there? +}\QuickQuizAnswerE{ + I \emph{was} surprised by the data I obtained and did a rigorous + check of their validity. + I got the same result persistently. + One theory that might explain the observation would be: + The two threads in the core are able to overlap their accesses, + while the single CPU must do everything sequentially. + Unfortunately, there seems to be no public documentation explaining + why the Intel X5550 (Nehalem) system behaved like that. +}\QuickQuizEndE +} % End of \QuickQuizSeries \subsection{Hardware Optimizations} \label{sec:cpu:Hardware Optimizations}
Quoted 1 line
base-commit:
14440e232cc1b2580dc1a73f873dc29fe3aea02b
Tested on Gitlab:
https://gitlab.com/linux-kernel/perfbook/-/pipelines/774642106
Observations for this PDF:
QQz 3.7 has the mentioned table.
QQz 3.9 has the comment on the table.
'Question + link' to QQz 3.9 appears in Chapter 3, on the page after 'question + link' to QQz 3.7.
Is that the desired output?
(It feels a little 'misplaced', TBH. The best place would be just after QQz 3.7, but looking into your comments, it seems it was not possible.)
Anyway, if the desired output was achieved:
Best regards,
Leo
Re: [PATCH -perfbook] cpu: PoC of A QQz citing table in answer to another QQz (was Re: Question about Table E.1)
Quoted 41 lines · Leonardo Brás
Quoted 40 lines · Akira Yokosawa
Subject: [PATCH -perfbook] cpu: Add a QQz citing table E.1
An email thread started from a question from Leo [1] stimulated me to add a QQz on Paul's experience back in 2009.
Signed-off-by Akira Yokosawa <[email protected]>---
Quoted 4 lines · I wrote:
On second thought, it should be possible to put a QQz next to QQz 3.7 citing Table E.1 in the Quiz part.
Let me try and produce a PoC patch.
Something like this?
I couldn't make the QQz next to QQz 3.7 due to the
\QuickQuizLabel{\QspeedOfLightAtoms}
just below QQz 3.7.
If you put the label in the middle of\QuickQuizSeries{
...
}, you will get build errors in -nq builds.
Instead, I added it next to QQz 3.8 (or the end of Section 3.2.2). It looks still relevant there.
The wording of the Quiz and its Answer is just a stub. Paul, feel free to rewrite them as you like.
Thanks, Akira
--cpu/overheads.tex | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-)
...
Quoted 3 lines
Tested on Gitlab:
https://gitlab.com/linux-kernel/perfbook/-/pipelines/774642106
Thank you for testing!
Quoted 11 lines
Observations for this PDF:
QQz 3.7 has the mentioned table.
QQz 3.9 has the comment on the table.
'Question + link' to QQz 3.9 appears in Chapter 3, on the page after 'question + link' to QQz 3.7.Is that the desired output?
(It feels a little 'misplaced', TBH. The best place would be just after QQz 3.7, but looking into your comments, it seems it was not possible.)
I think I have figured out the way for placing it next to QQz 3.7.
Will post a v2 after testing on my side.
Thanks, Akira
Quoted 10 lines
Anyway, if the desired output was achieved:
Tested-by Leonardo Bras <[email protected]>Reviewed-by Leonardo Bras <[email protected]>Best regards,
Leo
PATCH v2 1/1 cpu: Add a QQz on table E.1
In reply to Akira YokosawaAn email thread started from a question from Leo [1] stimulated me to add a QQz on Paul's experience back in 2009.
As \QuickQuizLabel{} inside \QuickQuizSeries{} doesn't work in -nq builds, define \QuickQuizLabelRel{}{} and put it in front of the series.
---
v2: Place new QQz next to QQz 3.7
--
cpu/overheads.tex | 28 +++++++++++++++++++++++----- qqz.sty | 16 ++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-)
cpu/overheads.tex +23 -5
@@ -290,12 +290,15 @@ nanoseconds, or more than seven hundred clock cycles. A CAS operation consumes almost a full microsecond, or almost two thousand clock cycles. -\QuickQuiz{ +\QuickQuizLabelRel{\QspeedOfLightAtoms}{1} % cann't put label inside QQSeries + +\QuickQuizSeries{% +\QuickQuizB{ Surely the hardware designers could be persuaded to improve this situation! Why have they been content with such abysmal performance for these single-instruction operations? -}\QuickQuizAnswer{ +}\QuickQuizAnswerB{ The hardware designers \emph{have} been working on this problem, and have consulted with no less a luminary than the late physicist Stephen Hawking.
@@ -423,9 +426,24 @@ thousand clock cycles. \Cref{sec:cpu:Hardware Free Lunch?} looks at what else hardware designers might be able to do to ease the plight of parallel programmers. -}\QuickQuizEnd - -\QuickQuizLabel{\QspeedOfLightAtoms} +}\QuickQuizEndB +% +\QuickQuizE{ + \Cref{tab:cpu:Performance of Synchronization Mechanisms on 16-CPU 2.8GHz Intel X5550 (Nehalem) System} + in the answer to \QuickQuizARef{\QspeedOfLightAtoms} says that + In-Core CAS is faster than both of Same-CPU CAS and In-Core Blind CAS\@. + What is happening there? +}\QuickQuizAnswerE{ + I \emph{was} surprised by the data I obtained and did a rigorous + check of their validity. + I got the same result persistently. + One theory that might explain the observation would be: + The two threads in the core are able to overlap their accesses, + while the single CPU must do everything sequentially. + Unfortunately, there seems to be no public documentation explaining + why the Intel X5550 (Nehalem) system behaved like that. +}\QuickQuizEndE +} % End of \QuickQuizSeries \begin{table} \rowcolors{1}{}{lightgray}
qqz.sty +16 -0
@@ -156,6 +156,11 @@ % To create a macro referencing the previously defined quick quiz: % \QuickQuizLabel{\QQname} +% +% When labeling a QQz inside \QuickQuizSeries{}, use +% \QuickQuizLabelRel{\QQname}{rel} +% in front of the series. +% % To reference the macro in the text: % \QuickQuizRef{\QQname} % To reference the answer of the macro in the text:
@@ -166,6 +171,11 @@ \newcommand{\QuickQuizLabel}[1]{ \edef#1{\thechapter.\thequickquizctrP} } +\newcommand{\QuickQuizLabelRel}[2]{ + \addtocounter{quickquizctrP}{#2} + \QuickQuizLabel{#1} + \addtocounter{quickquizctrP}{-#2} +} \newcommand{\QuickQuizRef}[1]{% \hyperref[QQ.#1]{Quick Quiz~#1}% }
@@ -176,6 +186,12 @@ \newcommand{\QuickQuizLabel}[1]{ \edef#1{\thechapter.\thequickquizctr} } +\newcommand{\QuickQuizLabelRel}[2]{ + \addtocounter{quickquizctr}{#2} + \QuickQuizLabel{#1} + \addtocounter{quickquizctr}{-#2} +} + \newcommand{\QuickQuizRef}[1]{% \hyperref[QQ.#1]{Quick Quiz~#1}% }
base-commit: 14440e232cc1b2580dc1a73f873dc29fe3aea02b
Signature · 1 line
2.25.1
Paul E. McKenney
AppliedRe: [PATCH -perfbook v2] cpu: Add a QQz on table E.1
Quoted 10 lines · Akira Yokosawa
An email thread started from a question from Leo [1] stimulated me to add a QQz on Paul's experience back in 2009.
As \QuickQuizLabel{} inside \QuickQuizSeries{} doesn't work in -nq builds, define \QuickQuizLabelRel{}{} and put it in front of the series.
Signed-off-by Akira Yokosawa <[email protected]>Cc Leonardo Brás <[email protected]>
Queued and pushed, thank you!
Thanx, Paul
Quoted 105 lines
---
v2: Place new QQz next to QQz 3.7--
cpu/overheads.tex | 28 +++++++++++++++++++++++----- qqz.sty | 16 ++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-)cpu/overheads.tex +23
-5@@ -290,12 +290,15 @@ nanoseconds, or more than seven hundred clock cycles. A CAS operation consumes almost a full microsecond, or almost two thousand clock cycles. -\QuickQuiz{ +\QuickQuizLabelRel{\QspeedOfLightAtoms}{1} % cann't put label inside QQSeries + +\QuickQuizSeries{% +\QuickQuizB{ Surely the hardware designers could be persuaded to improve this situation! Why have they been content with such abysmal performance for these single-instruction operations? -}\QuickQuizAnswer{ +}\QuickQuizAnswerB{ The hardware designers \emph{have} been working on this problem, and have consulted with no less a luminary than the late physicist Stephen Hawking.@@ -423,9 +426,24 @@ thousand clock cycles. \Cref{sec:cpu:Hardware Free Lunch?} looks at what else hardware designers might be able to do to ease the plight of parallel programmers. -}\QuickQuizEnd - -\QuickQuizLabel{\QspeedOfLightAtoms} +}\QuickQuizEndB +% +\QuickQuizE{ + \Cref{tab:cpu:Performance of Synchronization Mechanisms on 16-CPU 2.8GHz Intel X5550 (Nehalem) System} + in the answer to \QuickQuizARef{\QspeedOfLightAtoms} says that + In-Core CAS is faster than both of Same-CPU CAS and In-Core Blind CAS\@. + What is happening there? +}\QuickQuizAnswerE{ + I \emph{was} surprised by the data I obtained and did a rigorous + check of their validity. + I got the same result persistently. + One theory that might explain the observation would be: + The two threads in the core are able to overlap their accesses, + while the single CPU must do everything sequentially. + Unfortunately, there seems to be no public documentation explaining + why the Intel X5550 (Nehalem) system behaved like that. +}\QuickQuizEndE +} % End of \QuickQuizSeries \begin{table} \rowcolors{1}{}{lightgray}qqz.sty +16
-0@@ -156,6 +156,11 @@ % To create a macro referencing the previously defined quick quiz: % \QuickQuizLabel{\QQname} +% +% When labeling a QQz inside \QuickQuizSeries{}, use +% \QuickQuizLabelRel{\QQname}{rel} +% in front of the series. +% % To reference the macro in the text: % \QuickQuizRef{\QQname} % To reference the answer of the macro in the text:@@ -166,6 +171,11 @@ \newcommand{\QuickQuizLabel}[1]{ \edef#1{\thechapter.\thequickquizctrP} } +\newcommand{\QuickQuizLabelRel}[2]{ + \addtocounter{quickquizctrP}{#2} + \QuickQuizLabel{#1} + \addtocounter{quickquizctrP}{-#2} +} \newcommand{\QuickQuizRef}[1]{% \hyperref[QQ.#1]{Quick Quiz~#1}% }@@ -176,6 +186,12 @@ \newcommand{\QuickQuizLabel}[1]{ \edef#1{\thechapter.\thequickquizctr} } +\newcommand{\QuickQuizLabelRel}[2]{ + \addtocounter{quickquizctr}{#2} + \QuickQuizLabel{#1} + \addtocounter{quickquizctr}{-#2} +} + \newcommand{\QuickQuizRef}[1]{% \hyperref[QQ.#1]{Quick Quiz~#1}% }base-commit:
14440e232cc1b2580dc1a73f873dc29fe3aea02bSignature · 1 line
2.25.1
Re: [PATCH -perfbook v2] cpu: Add a QQz on table E.1
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Akira Yokosawa
An email thread started from a question from Leo [1] stimulated me to add a QQz on Paul's experience back in 2009.
As \QuickQuizLabel{} inside \QuickQuizSeries{} doesn't work in -nq builds, define \QuickQuizLabelRel{}{} and put it in front of the series.
Quoted 5 lines
Quoted 3 lines
Signed-off-by Akira Yokosawa <akiygmail.com>Cc Leonardo Brás <[email protected]>Queued and pushed, thank you!
Paul, can you revert c82369bef3f6 ("cpu: Add a QQz citing table E.1")?
Patch v2 happens to have no conflict with v1 and you have applied both of them!
Now we have the same Quizzes of QQz 3.8 and QQz 3.10.
c82369bef3f6 can be reverted cleanly.
Thanks, Akira
Quoted 108 lines
Thanx, Paul
Quoted 105 lines
---
v2: Place new QQz next to QQz 3.7--
cpu/overheads.tex | 28 +++++++++++++++++++++++----- qqz.sty | 16 ++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-)cpu/overheads.tex +23
-5@@ -290,12 +290,15 @@ nanoseconds, or more than seven hundred clock cycles. A CAS operation consumes almost a full microsecond, or almost two thousand clock cycles. -\QuickQuiz{ +\QuickQuizLabelRel{\QspeedOfLightAtoms}{1} % cann't put label inside QQSeries + +\QuickQuizSeries{% +\QuickQuizB{ Surely the hardware designers could be persuaded to improve this situation! Why have they been content with such abysmal performance for these single-instruction operations? -}\QuickQuizAnswer{ +}\QuickQuizAnswerB{ The hardware designers \emph{have} been working on this problem, and have consulted with no less a luminary than the late physicist Stephen Hawking.@@ -423,9 +426,24 @@ thousand clock cycles. \Cref{sec:cpu:Hardware Free Lunch?} looks at what else hardware designers might be able to do to ease the plight of parallel programmers. -}\QuickQuizEnd - -\QuickQuizLabel{\QspeedOfLightAtoms} +}\QuickQuizEndB +% +\QuickQuizE{ + \Cref{tab:cpu:Performance of Synchronization Mechanisms on 16-CPU 2.8GHz Intel X5550 (Nehalem) System} + in the answer to \QuickQuizARef{\QspeedOfLightAtoms} says that + In-Core CAS is faster than both of Same-CPU CAS and In-Core Blind CAS\@. + What is happening there? +}\QuickQuizAnswerE{ + I \emph{was} surprised by the data I obtained and did a rigorous + check of their validity. + I got the same result persistently. + One theory that might explain the observation would be: + The two threads in the core are able to overlap their accesses, + while the single CPU must do everything sequentially. + Unfortunately, there seems to be no public documentation explaining + why the Intel X5550 (Nehalem) system behaved like that. +}\QuickQuizEndE +} % End of \QuickQuizSeries \begin{table} \rowcolors{1}{}{lightgray}qqz.sty +16
-0@@ -156,6 +156,11 @@ % To create a macro referencing the previously defined quick quiz: % \QuickQuizLabel{\QQname} +% +% When labeling a QQz inside \QuickQuizSeries{}, use +% \QuickQuizLabelRel{\QQname}{rel} +% in front of the series. +% % To reference the macro in the text: % \QuickQuizRef{\QQname} % To reference the answer of the macro in the text:@@ -166,6 +171,11 @@ \newcommand{\QuickQuizLabel}[1]{ \edef#1{\thechapter.\thequickquizctrP} } +\newcommand{\QuickQuizLabelRel}[2]{ + \addtocounter{quickquizctrP}{#2} + \QuickQuizLabel{#1} + \addtocounter{quickquizctrP}{-#2} +} \newcommand{\QuickQuizRef}[1]{% \hyperref[QQ.#1]{Quick Quiz~#1}% }@@ -176,6 +186,12 @@ \newcommand{\QuickQuizLabel}[1]{ \edef#1{\thechapter.\thequickquizctr} } +\newcommand{\QuickQuizLabelRel}[2]{ + \addtocounter{quickquizctr}{#2} + \QuickQuizLabel{#1} + \addtocounter{quickquizctr}{-#2} +} + \newcommand{\QuickQuizRef}[1]{% \hyperref[QQ.#1]{Quick Quiz~#1}% }base-commit:
14440e232cc1b2580dc1a73f873dc29fe3aea02bSignature · 1 line
2.25.1
Re: [PATCH -perfbook v2] cpu: Add a QQz on table E.1
Quoted 15 lines · Akira Yokosawa
Quoted 8 lines · Paul E. McKenney
Quoted 7 lines · Akira Yokosawa
An email thread started from a question from Leo [1] stimulated me to add a QQz on Paul's experience back in 2009.
As \QuickQuizLabel{} inside \QuickQuizSeries{} doesn't work in -nq builds, define \QuickQuizLabelRel{}{} and put it in front of the series.
Quoted 5 lines
Quoted 3 lines
Signed-off-by Akira Yokosawa <akiygmail.com>Cc Leonardo Brás <[email protected]>Queued and pushed, thank you!
Quoted 8 lines
Paul, can you revert
c82369bef3f6("cpu: Add a QQz citing table E.1")?Patch v2 happens to have no conflict with v1 and you have applied both of them!
Now we have the same Quizzes of QQz 3.8 and QQz 3.10.
c82369bef3f6can be reverted cleanly.
Apologies for my confusion! I have revered c82369bef3f6 as you suggested.
Thanx, Paul
Quoted 110 lines
Thanks, Akira
Quoted 108 lines
Thanx, Paul
Quoted 105 lines
---
v2: Place new QQz next to QQz 3.7--
cpu/overheads.tex | 28 +++++++++++++++++++++++----- qqz.sty | 16 ++++++++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-)cpu/overheads.tex +23
-5@@ -290,12 +290,15 @@ nanoseconds, or more than seven hundred clock cycles. A CAS operation consumes almost a full microsecond, or almost two thousand clock cycles. -\QuickQuiz{ +\QuickQuizLabelRel{\QspeedOfLightAtoms}{1} % cann't put label inside QQSeries + +\QuickQuizSeries{% +\QuickQuizB{ Surely the hardware designers could be persuaded to improve this situation! Why have they been content with such abysmal performance for these single-instruction operations? -}\QuickQuizAnswer{ +}\QuickQuizAnswerB{ The hardware designers \emph{have} been working on this problem, and have consulted with no less a luminary than the late physicist Stephen Hawking.@@ -423,9 +426,24 @@ thousand clock cycles. \Cref{sec:cpu:Hardware Free Lunch?} looks at what else hardware designers might be able to do to ease the plight of parallel programmers. -}\QuickQuizEnd - -\QuickQuizLabel{\QspeedOfLightAtoms} +}\QuickQuizEndB +% +\QuickQuizE{ + \Cref{tab:cpu:Performance of Synchronization Mechanisms on 16-CPU 2.8GHz Intel X5550 (Nehalem) System} + in the answer to \QuickQuizARef{\QspeedOfLightAtoms} says that + In-Core CAS is faster than both of Same-CPU CAS and In-Core Blind CAS\@. + What is happening there? +}\QuickQuizAnswerE{ + I \emph{was} surprised by the data I obtained and did a rigorous + check of their validity. + I got the same result persistently. + One theory that might explain the observation would be: + The two threads in the core are able to overlap their accesses, + while the single CPU must do everything sequentially. + Unfortunately, there seems to be no public documentation explaining + why the Intel X5550 (Nehalem) system behaved like that. +}\QuickQuizEndE +} % End of \QuickQuizSeries \begin{table} \rowcolors{1}{}{lightgray}qqz.sty +16
-0@@ -156,6 +156,11 @@ % To create a macro referencing the previously defined quick quiz: % \QuickQuizLabel{\QQname} +% +% When labeling a QQz inside \QuickQuizSeries{}, use +% \QuickQuizLabelRel{\QQname}{rel} +% in front of the series. +% % To reference the macro in the text: % \QuickQuizRef{\QQname} % To reference the answer of the macro in the text:@@ -166,6 +171,11 @@ \newcommand{\QuickQuizLabel}[1]{ \edef#1{\thechapter.\thequickquizctrP} } +\newcommand{\QuickQuizLabelRel}[2]{ + \addtocounter{quickquizctrP}{#2} + \QuickQuizLabel{#1} + \addtocounter{quickquizctrP}{-#2} +} \newcommand{\QuickQuizRef}[1]{% \hyperref[QQ.#1]{Quick Quiz~#1}% }@@ -176,6 +186,12 @@ \newcommand{\QuickQuizLabel}[1]{ \edef#1{\thechapter.\thequickquizctr} } +\newcommand{\QuickQuizLabelRel}[2]{ + \addtocounter{quickquizctr}{#2} + \QuickQuizLabel{#1} + \addtocounter{quickquizctr}{-#2} +} + \newcommand{\QuickQuizRef}[1]{% \hyperref[QQ.#1]{Quick Quiz~#1}% }base-commit:
14440e232cc1b2580dc1a73f873dc29fe3aea02bSignature · 1 line
2.25.1