Re: [PATCH v2 2/3] x86/smp: Allow forcing the mwait hint for play dead loop
From: Rafael J. Wysocki
Date: Wed Oct 30 2024 - 16:15:39 EST
On Wed, Oct 30, 2024 at 9:11 PM Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
>
> On 10/30/24 12:53, Rafael J. Wysocki wrote:
> > clearly referred to as a kexec() hack, which cannot be done in
> > cpuidle_play_dead() because the cpuidle driver doesn't know how to get
> > to md->control.
>
> What if we have an mwait_play_dead() _helper_? It takes the hint as an
> argument and retains all the kexec hacks. All the cpuidle driver has to
> do is call the helper with the hint that the cpuidle driver determines.
The same idea has occurred to me in the meantime, so yes, I think that
it would work.