Re: [PATCH] cpufreq: cppc: drop invariance when FIE is disabled

From: Jie Zhan

Date: Tue Feb 24 2026 - 23:08:16 EST



On 2/21/2026 6:49 AM, Penghe Geng wrote:
> CONFIG_ACPI_CPPC_CPUFREQ_FIE gates CPPC counter-based frequency
> invariance support. When FIE is disabled, the CPPC driver does not
> register a frequency scale source, but cpufreq_register_driver() still
> enables cpufreq_freq_invariance for target/fast-switch drivers.
>
> Disable cpufreq frequency invariance after CPPC driver registration when
> FIE is disabled. This avoids scheduler behavior mismatch when no
> invariance updates are provided, which can cause major performance
> regressions on sensitive platforms.
Hi Penghe,

IIUC, even if CPPC FIE is not there, cpufreq still updates frequency scales
in cpufreq_freq_transition_end() and cpufreq_driver_fast_switch(), so the
frequency scale number is still somewhat meaningful and the
'cpufreq_freq_invariance' static key reflects that correctly.

Any numbers or evidence of that "performance regressions" so that we can
understand the issue better?

Thanks,
Jie
>
> Export cpufreq_disable_freq_invariance() so modular cppc_cpufreq can call
> it.
>
> Fixes: 1eb5dde674f5 ("cpufreq: CPPC: Add support for frequency invariance")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Penghe Geng <pgeng@xxxxxxxxxx>
> ---
> drivers/cpufreq/cppc_cpufreq.c | 4 ++++
> drivers/cpufreq/cpufreq.c | 8 ++++++++
> include/linux/cpufreq.h | 3 +++
> 3 files changed, 15 insertions(+)
>
...