Re: [PATCH v3 2/3] x86/smp native_play_dead: Prefer cpuidle_play_dead() over mwait_play_dead()
From: Gautham R. Shenoy
Date: Thu Nov 14 2024 - 12:24:44 EST
Hello Peter,
On Thu, Nov 14, 2024 at 12:58:31PM +0100, Peter Zijlstra wrote:
> On Wed, Nov 13, 2024 at 05:11:38PM +0530, Gautham R. Shenoy wrote:
>
> > AMD platforms won't be using FFH based states for offlined CPUs. We
> > prefer IO based states when available, and HLT otherwise.
> >
> > >
> > > Robustly we'd teach the ACPI driver about FFh and set enter_dead on
> > > every state -- but we'd have to double check that with AMD.
> >
> > Works for us as long as those FFh states aren't used for play_dead on
> > AMD platforms.
>
> AFAIU AMD doesn't want to use MWAIT -- ever, not only for offline.
> Confirm?
>
AMD wants to use MWAIT for cpuidle and it does use MWAIT based C1
state on both client and server parts.
Eg: On my server box
$ cpupower idle-info | grep "FFH" -B1 -A3
C1:
Flags/Description: ACPI FFH MWAIT 0x0
Latency: 1
Usage: 6591
Duration: 1482606
> But if it were to use MWAIT for regular idle, then surely it's OK for
> offline too, right?
I tried this out today and there is no functional issue.
However, I would like to run some experiments on whether HLT provides
better power savings than MWAIT C1 with CPUs offlined. I will get back
with this information tomorrow.
--
Thanks and Regards
gautham.