[PATCH 1/3] powerpc/powernv: Avoid the secondary hold spinloop for OPAL boot
Nicholas Piggin
npiggin at gmail.com
Tue Oct 10 22:44:15 AEDT 2017
On Tue, 10 Oct 2017 22:11:46 +1100
Michael Ellerman <mpe at ellerman.id.au> wrote:
> Nicholas Piggin <npiggin at 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.
Thanks,
Nick
More information about the Linuxppc-dev
mailing list