[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ee9b0a70-6f44-4203-bba9-c07d94444ad6@linux.intel.com>
Date: Tue, 12 Nov 2024 11:57:08 +0100
From: Patryk Wlazlyn <patryk.wlazlyn@...ux.intel.com>
To: Dave Hansen <dave.hansen@...el.com>, x86@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
rafael.j.wysocki@...el.com, len.brown@...el.com,
artem.bityutskiy@...ux.intel.com, dave.hansen@...ux.intel.com
Subject: Re: [PATCH v3 3/3] intel_idle: Provide enter_dead() handler for SRF
> This series has said multiple times how the old algorithm is wrong. But
> it never actually _fixed_ the bad algorithm, only worked around it.
>
> Does mwait_play_dead() itself need to get fixed?
I don't think so. The old algorithm gives fairly good heuristic for computing
the mwait hint for the deepest cstate. Even though it's not guaranteed to work,
it does work on most of the platforms that don't early return. I think we should
leave it, but prefer idle_driver.
>> Define the enter_dead() handler for SRF.
>
> This effectively gets the mwait hints from ______ instead of using the
> calculation in mwait_play_dead().
Ok.
>> +static __cpuidle int intel_idle_enter_dead(struct cpuidle_device *dev,
>> + int index)
>> +{
>> + struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev);
>> + struct cpuidle_state *state = &drv->states[index];
>> + unsigned long eax = flg2MWAIT(state->flags);
>> +
>> + /* Retruns only in case of an error. */
>
> ^ returns?
Yup. Will fix.
Powered by blists - more mailing lists