Intel P-State Updates Enhance Linux Scheduling for Improved Performance on Hybrid CPUs

Intel P-State Updates Enhance Linux Scheduling for Improved Performance on Hybrid CPUs


Intel engineer and Linux power management maintainer Rafael Wysocki is currently testing a new set of patches aimed at improving task scheduling and performance for modern Intel Core hybrid processors. These patches focus on accounting for asymmetrical CPU capability in hybrid systems within the Intel P-State CPU Frequency Scaling Controller, particularly systems that are hybrid but without SMT (Hyper Threading).

The new feature code being added to the patches allows intel_pstate to use the HWP_HIGHEST_PERF values of MSR_HWP_CAPABILITIES to set asymmetric CPU capacity information via arch_set_cpu_capacity(). This is necessary to ensure consistent task sizing across all CPUs in a system with varying capacities, which in turn should enhance scheduling decisions and allow the schedutil cpufreq governor to work effectively on hybrid systems where tasks migrate between CPUs of different capacities.

The patches disable ITMT support in the scheduler for hybrid and non-SMT systems, as it may interfere with the asymmetric CPU capability code. The code calculates the capacity number for each CPU by dividing the product of its HWP_HIGHEST_PERF and SCHED_CAPACITY_SCALE by the maximum HWP_HIGHEST_PERF. When a CPU goes offline, its capacity is reset, and if it is the CPU with the maximum value HWP_HIGHEST_PERF, the capacity numbers for other online CPUs are recalculated. The same process occurs when a new CPU comes online or when the controller is notified of a change in CPU capacity.

The focus on hybrid systems without SMT suggests that these optimizations may be beneficial for upcoming Intel Lunar Lake processors, which are rumored to lack Hyper Threading in their P cores. The test patches do not provide a quantitative assessment of the performance impact compared to the current Linux 6.10, but it is hoped they will be ready to merge in time for the Linux 6.11 release.

In addition to the intel_pstate-testing patches, an update to the Intel Lunar Lake hybrid scaling factor for the Intel P-State controller has been introduced in the “-next” branch of Linux power management. This update increases the hybrid scaling factor to 86957 for Lunar Lake, distinguishing further between the scaling behavior of the P and E cores for the upcoming processors.

Overall, the new set of patches being tested by Rafael Wysocki aims to enhance the performance and task scheduling capabilities of modern Intel Core hybrid processors, particularly focusing on systems that are hybrid but lack SMT. These optimizations could have implications for upcoming processors like the Intel Lunar Lake, which may see improved performance and efficiency with the implementation of these changes.

Article Source
https://www.phoronix.com/news/Intel-P-State-Asymmetric-Cap