RE: [PATCH v6 04/12] x86/smpboot.c: Don't offline CPU0 if any irqcan not be migrated out of it and remove CPU0 check in smp_callin()
From: Yu, Fenghua
Date: Thu May 17 2012 - 21:47:09 EST
> -----Original Message-----
> From: Siddha, Suresh B
> Sent: Thursday, May 17, 2012 3:47 PM
> To: Ingo Molnar
> Cc: Luck, Tony; Thomas Gleixner; Yu, Fenghua; Ingo Molnar; H Peter
> Anvin; Linus Torvalds; Andrew Morton; Mallick, Asit K; Arjan Dan De Ven;
> Brown, Len; Srivatssa S. Bhat; Randy Dunlap; Chen Gong; linux-kernel;
> linux-pm; x86; Peter Zijlstra
> Subject: Re: [PATCH v6 04/12] x86/smpboot.c: Don't offline CPU0 if any
> irq can not be migrated out of it and remove CPU0 check in smp_callin()
>
> On Mon, 2012-05-14 at 14:17 +0200, Ingo Molnar wrote:
> > * Tony Luck <tony.luck@xxxxxxxxx> wrote:
> >
> > > Biggest code impact of that is the extra code to bring cpu0
> > > back online using NMI instead of INIT. We can't use INIT
> > > because if cpu0 gets one, it just resets the whole machine :-(
> > > But obviously we'd like to avoid special cases where there is
> > > a sane way to do so.
> >
> > Could we just standardize on NMI bringup during regular bootup?
>
> May be we can use the NMI or even better monitor/mwait based bringup to
> re-online an AP that is currently offline in play_dead(), specifically
> if we haven't lost that AP processor state because of suspend/resume
> event etc.
>
> This can speed-up online if we want to use light weight online/offline
> of the AP's for saving power on mobile platforms.
Then booting up AP via INIT and putting AP online back via NMI/mwait will have different wakeup method and code. We probably need a way to tell if it is first AP bringup or online AP/BSP during run time.
And if offlined CPU is not in mwait (e.g. CPU without mwait feature), mwait based bringup won't work. Do we need to fall back to NMI wakeup if offlined CPU is not in mwait?
Thanks.
-Fenghua
N§²æìr¸yúèØb²X¬¶ÇvØ^)Þ{.nÇ+·¥{±êçzX§¶¡Ü}©²ÆzÚ&j:+v¨¾«êçzZ+Ê+zf£¢·h§~Ûiÿûàz¹®w¥¢¸?¨èÚ&¢)ßfù^jÇy§m
á@A«a¶Úÿ0¶ìh®åi