From: Hao Lee <haolee.swjtu@gmail.com>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: perfbook@vger.kernel.org, paulmck@kernel.org
Subject: Re: A question about QuickQuiz 5.46
Date: Fri, 19 May 2023 06:28:47 +0000 [thread overview]
Message-ID: <20230519062847.GA17791@haolee.io> (raw)
In-Reply-To: <5961e95e-70c5-7b1a-1e87-cbdf0931161a@gmail.com>
On Thu, May 18, 2023 at 10:50:51AM +0900, Akira Yokosawa wrote:
> Hi,
>
> On Wed, 17 May 2023 12:01:10 +0000, Hao Lee wrote:
> > Hi, Paul
> >
> > I noticed that QuickQuiz 5.46 is causing confusion due to the fact that
> > balance_count() and flush_local_count() are both located within the
> > slowpath and are called sequentially. As a result, it is impossible for
> > them to compete for the counterandmax thread-local variable.
>
> Right.
> And that's exactly what is mentioned in the answer to the quiz.
>
> I guess it confused you because you didn't expect such an easy one,
> no ? :-)
In fact I'm confused about the question description.
I believe that this quiz should focus on the concurrency of global
variables, rather than on the concurrency of the atomic variable
`counterandmax`, which is currently the main focus of the description.
>
> Thanks, Akira
>
> > Therefore,
> > I believe that this quiz may be referring to the global variables
> > globalcount and globalreserve.
> >
> > Thanks,
> > Hao Lee
next prev parent reply other threads:[~2023-05-19 6:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-17 12:01 A question about QuickQuiz 5.46 Hao Lee
2023-05-18 1:50 ` Akira Yokosawa
2023-05-19 6:28 ` Hao Lee [this message]
2023-05-19 13:27 ` Akira Yokosawa
2023-05-21 7:54 ` Hao Lee
2023-05-21 10:42 ` Akira Yokosawa
2023-12-23 9:12 ` Akira Yokosawa
2023-12-30 23:57 ` Paul E. McKenney
2024-01-11 14:02 ` Akira Yokosawa
2024-01-11 14:04 ` [PATCH -perfbook 1/2] count_lim_atomic.c: Enclose complex loop with {} Akira Yokosawa
2024-01-11 14:05 ` [RFC PATCH -perfbook 2/2] count: Update QQ 5.46 Akira Yokosawa
2024-01-20 20:42 ` 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=20230519062847.GA17791@haolee.io \
--to=haolee.swjtu@gmail.com \
--cc=akiyks@gmail.com \
--cc=paulmck@kernel.org \
--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