From: Andrea Parri <andrea.parri@amarulasolutions.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [Question] atomic_fetch_andnot() in nohz_idle_balance()
Date: Mon, 26 Nov 2018 21:44:14 +0100 [thread overview]
Message-ID: <20181126204414.GA4643@andrea> (raw)
In-Reply-To: <CAKfTPtDm49JS7thuUn0--ocqpn2Du4qi8qsUeeHzGrAG_F2epw@mail.gmail.com>
On Mon, Nov 26, 2018 at 12:37:00PM +0100, Vincent Guittot wrote:
> On Mon, 26 Nov 2018 at 10:30, Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > On Wed, Nov 21, 2018 at 11:34:53PM +0100, Andrea Parri wrote:
> > > Hi,
> > >
> > > The comment for the atomic_fetch_andnot() in nohz_idle_balance() says:
> > >
> > > "barrier, pairs with nohz_balance_enter_idle(), ensures ..."
> > >
> > > which, well, does sound a note of warning... ;-)
> > >
> > > I see that nohz_balance_enter_idle() has an smp_mb__after_atomic() but
> > > the comment for the latter suggests that this barrier is pairing with
> > > the smp_mb() in _nohz_idle_balance().
> > >
> > > So, what is the intended pairing barrier for the atomic_fetch_andnot()?
> > > what (which memory accesses) do you want "to order" here?
> >
> > I can't seem to make sense of that comment either; the best I can come
> > up with is that it would order the prior NOHZ_KICK_MASK load vs us then
> > changing it.
> >
> > But that would order against kick_ilb(), not enter_idle.
> >
> > Vincent?
>
> I can't come with a good explanation.
> After looking into my email archive, the only explanation that i have
> is that the comments remains from a previous iteration of the feature
> that was based on a nohz.stats_state mechanism
I'm afraid I still can't help your comment... put in other terms, would
you feel "unconfortable" with _relax()ing the andnot()? (and if so ...)
Andrea
next prev parent reply other threads:[~2018-11-26 20:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-21 22:34 [Question] atomic_fetch_andnot() in nohz_idle_balance() Andrea Parri
2018-11-26 9:30 ` Peter Zijlstra
2018-11-26 11:37 ` Vincent Guittot
2018-11-26 20:44 ` Andrea Parri [this message]
2018-11-27 9:01 ` Vincent Guittot
2018-11-27 10:59 ` Andrea Parri
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=20181126204414.GA4643@andrea \
--to=andrea.parri@amarulasolutions.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.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