From: Paul Mackerras <paulus@ozlabs.org>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org,
"Gautham R . Shenoy" <ego@linux.vnet.ibm.com>
Subject: Re: [PATCH 3/3] powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead
Date: Mon, 5 Mar 2018 10:01:01 +1100 [thread overview]
Message-ID: <20180304230101.GC14569@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <20180301215734.6602315e@roar.ozlabs.ibm.com>
On Thu, Mar 01, 2018 at 09:57:34PM +1000, Nicholas Piggin wrote:
> On Thu, 1 Mar 2018 00:04:39 +0530
> Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> wrote:
>
> > * Nicholas Piggin <npiggin@gmail.com> [2017-11-18 00:08:07]:
[snip]
> > > diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c
> > > index a921d5428d76..610b1637c16f 100644
> > > --- a/arch/powerpc/platforms/powernv/idle.c
> > > +++ b/arch/powerpc/platforms/powernv/idle.c
> > > @@ -621,7 +621,12 @@ static int __init pnv_power9_idle_init(struct device_node *np, u32 *flags,
> > > continue;
> > > }
> > >
> > > - if (max_residency_ns < residency_ns[i]) {
> > > + /*
> > > + * Deepest stop for unplug must be PSSCR[EC]=1 (wakeup at
> > > + * 0x100.
> > > + */
> > > + if ((max_residency_ns < residency_ns[i])&&
> > > + (psscr_val[i] & PSSCR_EC)) {
> > > max_residency_ns = residency_ns[i];
> > > pnv_deepest_stop_psscr_val = psscr_val[i];
> > > pnv_deepest_stop_psscr_mask = psscr_mask[i];
> >
> > If firmware did not provide any ESL=EC=1 state, we can still leave
> > threads in stop ESL=0 state. This is just a corner case or random
> > test scenario. Why do we want to enforce that offline cpus really use
> > a ESL=0 state or just spin?
>
> It's because power9_offline_stop only has cases for EC=ESL=1
> states now.
>
> It actually looks like EC=ESL=0 unplug today is broken KVM, because
> the wakeup side does not check HWTHREAD_REQ, and yet they do set
> HWTHREAD_IN_IDLE. That would probably hang in KVM if we run with
> dependent threads, wouldn't it?
Right. KVM with indep_threads_mode=N is broken at the moment if you
run with powersave=off or if firmware provides no stop states with
EC=ESL=1. I'm not sure what's the best way to fix that.
> I think banning it for now should be okay.
Banning what exactly?
Paul.
next prev parent reply other threads:[~2018-03-04 23:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 14:08 [PATCH 0/3] one more try at idle improvements Nicholas Piggin
2017-11-17 14:08 ` [PATCH 1/3] powerpc/64s/idle: POWER9 implement a separate idle stop function for hotplug Nicholas Piggin
2018-02-28 18:24 ` Vaidyanathan Srinivasan
2018-04-03 16:03 ` [1/3] " Michael Ellerman
2018-04-03 17:13 ` Nicholas Piggin
2018-04-04 12:52 ` Michael Ellerman
2017-11-17 14:08 ` [PATCH 2/3] powerpc/64s/idle: avoid sync for KVM state when waking from idle Nicholas Piggin
2018-02-28 18:16 ` Vaidyanathan Srinivasan
2018-03-01 11:38 ` Nicholas Piggin
2018-04-03 16:03 ` [2/3] " Michael Ellerman
2017-11-17 14:08 ` [PATCH 3/3] powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead Nicholas Piggin
2018-02-28 18:34 ` Vaidyanathan Srinivasan
2018-03-01 11:57 ` Nicholas Piggin
2018-03-04 23:01 ` Paul Mackerras [this message]
2018-03-05 9:59 ` Nicholas Piggin
2018-03-31 11:46 ` Michael Ellerman
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=20180304230101.GC14569@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=ego@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
--cc=svaidy@linux.vnet.ibm.com \
/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).