From: "Paul E. McKenney" <paulmck@kernel.org>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: "Leonardo Brás" <leobras.c@gmail.com>, perfbook@vger.kernel.org
Subject: Re: [PATCH -perfbook v2] cpu: Add a QQz on table E.1
Date: Mon, 13 Feb 2023 11:37:32 -0800 [thread overview]
Message-ID: <20230213193732.GD2948950@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <42ad02ef-121a-e835-bee7-139a083607a4@gmail.com>
On Mon, Feb 13, 2023 at 10:54:09AM +0900, Akira Yokosawa wrote:
> On Sun, 12 Feb 2023 16:28:56 -0800, Paul E. McKenney wrote:
> > On Sun, Feb 12, 2023 at 09:42:07AM +0900, Akira Yokosawa wrote:
> >> 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.
> >>
> >> Link: [1] https://www.spinics.net/lists/perfbook/msg03824.html
> >> Signed-off-by: Akira Yokosawa <akiygmail.com>
> >> Cc: Leonardo Brás <leobras.c@gmail.com>
> >
> > 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.
Apologies for my confusion! I have revered c82369bef3f6 as you
suggested.
Thanx, Paul
> Thanks, Akira
>
> >
> > Thanx, Paul
> >
> >> ---
> >> v2: Place new QQz next to QQz 3.7
> >>
> >> --
> >> cpu/overheads.tex | 28 +++++++++++++++++++++++-----
> >> qqz.sty | 16 ++++++++++++++++
> >> 2 files changed, 39 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/cpu/overheads.tex b/cpu/overheads.tex
> >> index 0d8270bf6e17..a89c71158bf9 100644
> >> --- a/cpu/overheads.tex
> >> +++ b/cpu/overheads.tex
> >> @@ -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}
> >> diff --git a/qqz.sty b/qqz.sty
> >> index a3a9f22d1ba9..5c7eb5340194 100644
> >> --- a/qqz.sty
> >> +++ b/qqz.sty
> >> @@ -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
> >> --
> >> 2.25.1
> >>
> >>
prev parent reply other threads:[~2023-02-13 19:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-08 3:07 Question about Table E.1 Leonardo Brás
2023-02-08 3:41 ` Paul E. McKenney
2023-02-08 5:33 ` Leonardo Brás
2023-02-08 5:50 ` Leonardo Brás
2023-02-08 8:47 ` Akira Yokosawa
2023-02-08 10:26 ` Akira Yokosawa
2023-02-08 22:15 ` Paul E. McKenney
2023-02-08 23:49 ` Akira Yokosawa
2023-02-09 11:13 ` Akira Yokosawa
2023-02-09 15:12 ` [PATCH -perfbook] cpu: PoC of A QQz citing table in answer to another QQz (was Re: Question about Table E.1) Akira Yokosawa
2023-02-11 8:49 ` Leonardo Brás
2023-02-12 0:04 ` Akira Yokosawa
2023-02-12 0:42 ` [PATCH -perfbook v2] cpu: Add a QQz on table E.1 Akira Yokosawa
2023-02-13 0:28 ` Paul E. McKenney
2023-02-13 1:54 ` Akira Yokosawa
2023-02-13 19:37 ` Paul E. McKenney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230213193732.GD2948950@paulmck-ThinkPad-P17-Gen-1 \
--to=paulmck@kernel.org \
--cc=akiyks@gmail.com \
--cc=leobras.c@gmail.com \
--cc=perfbook@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).