Re: [PATCH v3 2/3] x86/smp native_play_dead: Prefer cpuidle_play_dead() over mwait_play_dead()
From: Artem Bityutskiy
Date: Tue Nov 12 2024 - 08:02:07 EST
On Tue, 2024-11-12 at 13:18 +0100, Peter Zijlstra wrote:
> But on Intel we really don't want HLT, and had that MWAIT, but that has
> real problems with KEXEC. And I don't think we can rely on INTEL_IDLE=y.
If INTEL_IDLE is not set, then we'll just use existing mwait creation algorithm
in 'mwait_play_dead()', which works too, just not ideal.
> Anyway, ideally x86 would grow a new instruction to offline a CPU, both
> MWAIT and HLT have problems vs non-maskable interrupts.
... snip ...
> But as said, we need a new instruction.
FYI, I already started discussing a special "gimme the deepest C-state" mwait
hint - just a constant like 0xFF. CPUID leaf 5 has many reserved bits, one could
be used for enumeration of this feature.
But this is just a quick idea so far, and informal discussions so far.
Artem.