From: Nicholas Piggin <npiggin@gmail.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org,
Vasant Hegde <hegdevasant@linux.vnet.ibm.com>,
Stewart Smith <stewart@linux.vnet.ibm.com>
Subject: Re: [PATCH 1/3] powerpc/powernv: Avoid the secondary hold spinloop for OPAL boot
Date: Wed, 11 Oct 2017 01:58:28 +1000 [thread overview]
Message-ID: <20171011015828.03f4aacc@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20171010214357.2b6694fa@roar.ozlabs.ibm.com>
On Tue, 10 Oct 2017 21:44:15 +1000
Nicholas Piggin <npiggin@gmail.com> wrote:
> On Tue, 10 Oct 2017 22:11:46 +1100
> Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> > Nicholas Piggin <npiggin@gmail.com> writes:
> >
> > > OPAL boot does not insert secondaries at 0x60 to wait at the secondary
> > > hold spinloop. Instead it keeps them held in firmware until the
> > > opal_start_cpu call is made, which directs them where the caller
> > > specifies. Linux inserts them into generic_secondary_smp_init(), which
> > > is after the secondary hold spinloop (they go on to spin at the per-CPU
> > > paca loops, but that is another step).
> > >
> > > So avoid waiting on this spinloop when booting with OPAL firmware.
> > > It always just times out.
> > >
> > > This saves 100ms boot time on bare metal, and 10s of seconds when
> > > booting the simulator in SMP.
> >
> > Oh nice, that's real facepalm territory.
> >
> > It'd be neater if we just inserted them at 0x60, but the sequence is
> > wrong.
> >
> > Can we fix it just by making spinning_secondaries zero on OPAL?
>
> I had a look at that, but generic_secondary_smp_init() still
> decrements it, so it would underflow which I thought was
> uglier.
>
> I actually have to look a bit further, because KVM guests are
> also having the loop time out too by the looks.
Ahh okay, pseries is using the start-cpu RTAS call to enter at
generic_secondary_smp_init() as well. So we can take it out for
pseries as well.
Thanks,
Nick
next prev parent reply other threads:[~2017-10-10 15:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 6:10 [PATCH 0/3] some boot/shutdown improvements Nicholas Piggin
2017-10-06 6:10 ` [PATCH 1/3] powerpc/powernv: Avoid the secondary hold spinloop for OPAL boot Nicholas Piggin
2017-10-10 11:11 ` Michael Ellerman
2017-10-10 11:44 ` Nicholas Piggin
2017-10-10 15:58 ` Nicholas Piggin [this message]
2017-10-10 18:52 ` Nicholas Piggin
2017-10-11 11:27 ` Michael Ellerman
2017-10-11 14:00 ` Nicholas Piggin
2017-10-06 6:10 ` [PATCH 2/3] powerpc/powernv: Always stop secondaries before reboot/shutdown Nicholas Piggin
2017-10-06 6:10 ` [PATCH 3/3] powerpc: use NMI IPI for smp_send_stop 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=20171011015828.03f4aacc@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=hegdevasant@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=stewart@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).