Intel P-State Driver Seeing More Fixes For Hybrid CPUs With Linux 6.2

Written by Michael Larabel in Intel on 27 October 2022 at 06:36 AM EDT. Add A Comment
While the Intel Alder Lake and now Raptor Lake hybrid processor support on Linux is in good shape after various improvements to the kernel for dealing with the mix of P and E cores, there are occasional caveats. Posted this week were a set of Intel P-State driver fixes around hardware P-states (HWP) calibration to ensure it's working on all Intel hybrid platforms.

Intel engineer and Linux power management subsystem maintainer Rafael Wysocki sent out the set of two patches for ensuring the HWP calibration is working on all platforms. He summed up the patch series with this cover letter explaining the situation:
The HWP calibration in intel_pstate is needed to map HWP performance levels to frequencies, which are used in the cpufreq sysfs interface, in a reliable way. On all non-hybrid "core" platforms it is sufficient to multiply the HWP performance levels by 100000 to obtain the corresponding frequencies, but on hybrid ones there is a difference between P-cores and E-cores.

Previous attempts to make this work were based on using CPPC (and in particular the nominal performance values provided by _CPC), but it turns out that the CPPC information is not sufficiently reliable for this purpose and the only way to do it is to use a hard-coded scaling factors for P-cores and for E-cores (which fortunately is the same as in the non-hybrid case). Fortunately, the same scaling factor for P-cores works on all of the hybrid platforms to date.

The first patch in the series ensures that all of the CPUs will use correct information from MSRs by avoiding the situations in which an MSR values read on one CPU will be used for performance scaling of another CPU.

The second one implements the approach outlined above.

The first patch also further explained:
Some of the MSR accesses in intel_pstate are carried out on the CPU that is running the code, but the values coming from them are used for the performance scaling of the other CPUs.

This is problematic, for example, on hybrid platforms where MSR_TURBO_RATIO_LIMIT for P-cores and E-cores is different, so the values read from it on a P-core are generally not applicable to E-cores and the other way around.

This is a "fix" to Intel P-State HWP calibration code that was queued up in September of 2021.

The Intel Core i9 13900K "Raptor Lake" processor is running well on Linux.

As of now Rafael has picked up the P-State patches into his linux-pm.git's linux-next branch making it material for Linux 6.2. But given that it's also a fix for shipping Intel processors and for a year-old issue with the P-State driver, it's possible it will also be back-ported to existing Linux stable series.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week