Re: [PATCH v4] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume
From: Josh Poimboeuf
Date: Fri May 31 2019 - 11:30:24 EST
On Fri, May 31, 2019 at 04:54:20PM +0200, Jiri Kosina wrote:
> On Fri, 31 May 2019, Andy Lutomirski wrote:
>
> > For that matter, what actually happens if we get an SMI while halted?
> > Does RSM go directly to sleep or does it re-fetch the HLT?
>
> Our mails just crossed, I replied to Josh's mwait() proposal patch a
> minute ago.
Good catch. I agree that mwait seems unsafe across resume and my patch
is bogus.
Andy, in the short term it sounds like you're proposing to make
native_play_dead() use hlt_play_dead() unconditionally. Right?
That would simplify things and also would fix Jiri's bug I think. The
only question I'd have is if we have data on the power savings
difference between hlt and mwait. mwait seems to wake up on a lot of
different conditions which might negate its deeper sleep state.
Andy, for your long term idea to use INIT IPI, I wonder if that would
work with SMT siblings? Specifically I wonder about the Intel issue
that requires siblings to have CR4.MCE set.
--
Josh