From: SeongJae Park <sj38.park@gmail.com>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: SeongJae Park <sj@kernel.org>,
paulmck@kernel.org, SeongJae Park <sj38.park@gmail.com>,
perfbook@vger.kernel.org
Subject: Re: [PATCH 10/10] memorder: Fix wrong primitive names in a quick quizz
Date: Sun, 24 Sep 2023 08:40:04 -0700 [thread overview]
Message-ID: <20230924154005.5114-1-sj@kernel.org> (raw)
In-Reply-To: <9783529e-b974-8f64-c2f0-4fc52b04746e@gmail.com>
Hi Akira,
On Sun, 24 Sep 2023 09:02:53 +0900 Akira Yokosawa <akiyks@gmail.com> wrote:
> Hi,
>
> On 2023/09/24 1:32, SeongJae Park wrote:
> > From: SeongJae Park <sj38.park@gmail.com>
> >
> > memorder.tex explains READ_ONCE() is having smp_mb(), but the following
> > quick quizz asks why it has mb() instead of rmb(). Fix the wrong names
> > in the quick quizz.
> >
> > Signed-off-by: SeongJae Park <sj38.park@gmail.com>
> > ---
> > memorder/memorder.tex | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/memorder/memorder.tex b/memorder/memorder.tex
> > index 5c978fbe..b3acc14a 100644
> > --- a/memorder/memorder.tex
> > +++ b/memorder/memorder.tex
> > @@ -5491,7 +5491,7 @@ Alpha is the only CPU whose \co{READ_ONCE()} includes an \co{smp_mb()}.
> > \QuickQuizSeries{%
> > \QuickQuizB{
> > Why does Alpha's \co{READ_ONCE()} include an
> > - \co{mb()} rather than \co{rmb()}?
> > + \co{smp_mb()} rather than \co{smp_rmb()}?
>
> Definition in Linux kernel's arch/alpha/include/asm/rwonce.h reads:
>
> #define __READ_ONCE(x) \
> ({ \
> __unqual_scalar_typeof(x) __x = \
> (*(volatile typeof(__x) *)(&(x))); \
> mb(); \
> (typeof(x))__x; \
> })
>
> So I don't think this change is needed.
>
> As this quiz is talking about Alpha ISA, how about rewording the
> quiz to:
>
> Why does Alpha's \co{READ_ONCE()} include an
> \co{mb} instruction rather than a \co{rmb}?
>
> Thanks, Akira
>
> > }\QuickQuizAnswerB{
> > Alpha has only \co{mb} and \co{wmb} instructions,
> > so \co{smp_rmb()} would be implemented by the Alpha \co{mb}
> > --
> > 2.17.1
That makes sense. Thank you for nice review and suggestion! I will make the
second version of this patch following your comment.
Thanks,
SJ
next prev parent reply other threads:[~2023-09-24 15:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-23 16:31 [PATCH 00/10] memorder: Trivial fixups SeongJae Park
2023-09-23 16:31 ` [PATCH 01/10] memorder: Fix typos: s/,/./ SeongJae Park
2023-09-23 16:31 ` [PATCH 02/10] memorder/memorder: Add a missing space between column name and 'column' SeongJae Park
2023-09-23 16:31 ` [PATCH 03/10] memorder: Add missing unbreakable spaces between 'values', 'and', and numbers SeongJae Park
2023-09-23 16:31 ` [PATCH 04/10] memorder: Remove an empty fcvref block SeongJae Park
2023-09-23 16:31 ` [PATCH 05/10] memorder: Remove braces for single line if-else blocks SeongJae Park
2023-09-23 16:32 ` [PATCH 06/10] memorder: Consistently use \co{} instead of {\tt } for code SeongJae Park
2023-09-23 16:32 ` [PATCH 07/10] memorder: Consistently use '\co{}' for 'herd' SeongJae Park
2023-09-23 16:32 ` [PATCH 08/10] memorder: Remove a redundant sentence for memory barrier strength SeongJae Park
2023-09-23 16:32 ` [PATCH 09/10] memorder: Make clear the scope of READ_ONCE()/WRITE_ONCE() heavy uses SeongJae Park
2023-09-23 16:32 ` [PATCH 10/10] memorder: Fix wrong primitive names in a quick quizz SeongJae Park
2023-09-24 0:02 ` Akira Yokosawa
2023-09-24 15:40 ` SeongJae Park [this message]
2023-09-24 14:57 ` [PATCH 00/10] memorder: Trivial fixups 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=20230924154005.5114-1-sj@kernel.org \
--to=sj38.park@gmail.com \
--cc=akiyks@gmail.com \
--cc=paulmck@kernel.org \
--cc=perfbook@vger.kernel.org \
--cc=sj@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