RE: [PATCH 3/6] x86/smpboot.c: Wake up offline CPU via mwait or nmi

From: Yu, Fenghua
Date: Mon Jun 04 2012 - 17:19:10 EST


> From: Siddha, Suresh B
> Sent: Monday, June 04, 2012 11:59 AM
> To: Yu, Fenghua
> Cc: Ingo Molnar; Thomas Gleixner; H Peter Anvin; Luck, Tony; Mallick,
> Asit K; Arjan Dan De Ven; linux-kernel; x86; linux-pm
> Subject: Re: [PATCH 3/6] x86/smpboot.c: Wake up offline CPU via mwait
> or nmi
>
> On Mon, 2012-06-04 at 11:17 -0700, Fenghua Yu wrote:
> > From: Fenghua Yu <fenghua.yu@xxxxxxxxx>
> >
> > wakeup_secondary_cpu_via_soft() is defined to wake up offline CPU via
> mwait if
> > the CPU is in mwait or via nmi if the CPU is in hlt.
> >
> > A CPU boots up by INIT, INIT, STARTUP sequence when it boots up for
> the first
> > time during boot time or hot plug.
>
> I think this breaks suspend/resume as the cpu state gets lost.
>
> Have you tried suspend/resume?

Good catch! Suspend/resume is broken.

A pm callback can be installed to clear cpu_dead state in suspend preparation. So when resume, INIT sequence is used to wakeup CPU's just like the boot time case.

I have a quick fix and will put it in the next version of the patchset.

Thanks.

-Fenghua
¢éì®&Þ~º&¶¬–+-±éÝ¥Šw®žË±Êâmébžìdz¹Þ)í…æèw*jg¬±¨¶‰šŽŠÝj/êäz¹ÞŠà2ŠÞ¨è­Ú&¢)ß«a¶Úþø®G«éh®æj:+v‰¨Šwè†Ù>Wš±êÞiÛaxPjØm¶Ÿÿà -»+ƒùdš_