Re: [RFC PATCH 2/4] cpufreq: intel_pstate: Send CPUFREQ_UPDATE_CPUINFO on max_freq changes
From: Ximing Zhang
Date: Sun Nov 08 2026 - 02:12:49 EST
Hi Hugo,
I tested the four patches unchanged on an Intel Core i7-10510U using
intel_pstate in active/HWP mode, on the stated base commit
5854d2ce4b0b9ccb37b154319d8283bad889a694.
Cooling states 0 through 3 followed Turbo changes in both directions.
I also ran 100 CPU 7 offline/online cycles concurrently with Turbo and
cooling-state writes, followed by the same sequential checks, and a
suspend/resume via rtcwake -m mem -s 15. Turbo was disabled before suspend
and enabled afterward. Those checks passed with lockdep enabled and no
new warnings. The test kernel was already tainted by unsigned modules;
that taint did not change during the tests.
There is one remaining Intel hotplug case: changing Turbo while CPU 7
is offline leaves that policy's cpuinfo.max_freq stale when it returns.
I reproduced the same stale CPU information on the stock
7.2.5-1-cachyos kernel, so this behavior predates the RFC.
On the patched kernel, starting with all CPUs online, Turbo enabled and
cooling state 0, I ran the following as root:
cpu=/sys/devices/system/cpu
cdev=/sys/class/thermal/cooling_device0
echo 1 > $cpu/intel_pstate/no_turbo
echo 1 > $cdev/cur_state
echo 0 > $cpu/cpu7/online
echo 0 > $cpu/intel_pstate/no_turbo
echo 1 > $cpu/cpu7/online
cat $cpu/cpufreq/policy7/cpuinfo_max_freq
cat $cpu/cpufreq/policy7/scaling_max_freq
These report 1800000 and 1440000 kHz. The policies for the other CPUs
report 4900000 and 3920000 kHz. With the Turbo transition reversed,
CPU 7 returns with a cpuinfo maximum of 4900000 instead of 1800000,
and an effective cap of 1800000 instead of 1440000 kHz.
I restored the starting state with all CPUs online:
echo 1 > $cpu/intel_pstate/no_turbo
echo 0 > $cpu/intel_pstate/no_turbo
echo 0 > $cdev/cur_state
intel_pstate_update_max_freq() uses cpufreq_cpu_get(), whose raw lookup
rejects an offline CPU. The reused policy then takes
intel_pstate_cpu_online(), which does not refresh cpuinfo.max_freq.
This appears to prevent the new notification from covering that case.
Is this case intended to be covered by this series, or would a separate
intel_pstate follow-up be more appropriate?
Thanks,
Ximing