From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
"Palik, Imre" <imrep.amz@gmail.com>,
perfbook@vger.kernel.org
Subject: Re: [PATCH 2/2] count: Reword Quick Quiz 5.6 to adjust context
Date: Sun, 16 Sep 2018 15:02:12 -0700 [thread overview]
Message-ID: <20180916220212.GD652@linux.ibm.com> (raw)
In-Reply-To: <ce79d51e-2557-b855-d7ee-cc9f22f22958@gmail.com>
On Sat, Sep 15, 2018 at 11:14:03AM +0900, Akira Yokosawa wrote:
> >From 7bf9ee029829a53009e29ea23b287bb874bd8ee4 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Fri, 14 Sep 2018 22:50:04 +0900
> Subject: [PATCH 2/2] count: Reword Quick Quiz 5.6 to adjust context
>
> count_nonatomic.c has lost the explicit "++" operator, so this is
> my humble attempt to update the question.
>
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
I adjusted it slightly, then applied and pushed it, thank you!
Could you please double check that I didn't mess something up?
Thanx, Paul
> ---
> Paul,
>
> Does this change look reasonable to you?
> I'm quite sure you will come up with something better. ;-)
>
> Thanks, Akira
> --
> count/count.tex | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/count/count.tex b/count/count.tex
> index cfdacb5..6a48b99 100644
> --- a/count/count.tex
> +++ b/count/count.tex
> @@ -193,7 +193,9 @@ Although approximate values do have their place in computing,
> accuracies far greater than 50\,\% are almost always necessary.
>
> \QuickQuiz{}
> - But doesn't the \co{++} operator produce an x86 add-to-memory
> + But doesn't a smart compiler prove
> + line~\ref{ln:count:count_nonatomic:inc-read:inc} is equivalent
> + to the \co{++} operator and produce an x86 add-to-memory
> instruction?
> And won't the CPU cache cause this to be atomic?
> \QuickQuizAnswer{
> --
> 2.7.4
>
>
next prev parent reply other threads:[~2018-09-16 22:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-15 2:08 [PATCH 1/2] count: Use new scheme for updated 2 snippets Akira Yokosawa
2018-09-15 2:14 ` [PATCH 2/2] count: Reword Quick Quiz 5.6 to adjust context Akira Yokosawa
2018-09-16 22:02 ` Paul E. McKenney [this message]
2018-09-16 22:52 ` Akira Yokosawa
2018-09-16 23:01 ` [PATCH] Enable hyperlink to line label in code snippet Akira Yokosawa
2018-09-17 0:11 ` Paul E. McKenney
2018-09-16 22:01 ` [PATCH 1/2] count: Use new scheme for updated 2 snippets Paul E. McKenney
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=20180916220212.GD652@linux.ibm.com \
--to=paulmck@linux.ibm.com \
--cc=akiyks@gmail.com \
--cc=imrep.amz@gmail.com \
--cc=paulmck@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.