From: Nicholas Piggin <npiggin@gmail.com>
To: Benjamin Herrenschmidt <benh@au1.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org,
"Gautham R . Shenoy" <ego@linux.vnet.ibm.com>,
"Shreyas B . Prabhu\" <shreyas@linux.vnet.ibm.com>
Subject: Re: [PATCH 00/14 v2] idle performance improvements
Date: Mon, 12 Jun 2017 15:47:07 +1000 [thread overview]
Message-ID: <20170612154707.61380a1e@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <1497241524.2897.1.camel@au1.ibm.com>
On Mon, 12 Jun 2017 14:25:24 +1000
Benjamin Herrenschmidt <benh@au1.ibm.com> wrote:
> On Sun, 2017-06-11 at 19:30 +1000, Nicholas Piggin wrote:
> > I rebased this on the powerpc next tree.
> >
> > A couple of things are changed since last post:
> >
> > - Patch 1 now properly accounts for the fact the powernv idle
> > wakeups do not re-enable interrupts until the cpuidle driver
> > enables them. This was not quite right in the previous patch
> > (and prep_irq_for_idle() is not quite right for that case so
> > a new primitive has to be introduced).
>
> What do you mean ? We shouldn't be going to sleep with the CPU thinking
> it's interrupts are off, otherwise we end up effectively "taking an
> interrupt while off" which is not right and it will cause accounting to
> think we are off for too long.
>
> Is this a generic cpuidle problem or a powerpc issue ?
cpuidle drivers enter their idle state with local_irq_disable().
powernv cpuidle driver currently does not call trace_hardirqs_on()
before going to sleep (e.g., it does not use prep_irq_for_idle()).
I did a previous patch that uses prep_irq_for_idle directly, but
that assumes when we return from idle that local irqs should be
on. The generic cpuidle does not want that, I haven't dug into
exactly why not. But it seems to work better just to put the SRR1
wakeup reason into the irq_pending bit and let the lazy irq logic
take care of the rest.
> I'd rather we don't have to of those "prep_for_idle...". If necessary
> sync the other one.
Okay one can call the other rather than implementing twice.
Thanks,
Nick
next prev parent reply other threads:[~2017-06-12 5:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-11 9:30 [PATCH 00/14 v2] idle performance improvements Nicholas Piggin
2017-06-12 4:25 ` Benjamin Herrenschmidt
2017-06-12 5:47 ` Nicholas Piggin [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-06-11 23:58 Nicholas Piggin
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=20170612154707.61380a1e@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=benh@au1.ibm.com \
--cc=ego@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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 NNTP newsgroup(s).