Intel Advances Linux "IPC Classes" Design To Improve Load Balancing For Hybrid CPUs
Intel engineer Ricardo Neri sent out the new set of 22 patches yesterday. Given that this prior proposal around introducing IPC classes for load balancing hadn't received any strong objections, he's dropped the request for comments (RFC) tag with hopes of this work eventually working its way into the mainline kernel.
Intel Alder Lake and Raptor Lake processors stand to benefit from these latest Linux kernel patches.
As a reminder what this work is all about, from the prior RFC patches:
On hybrid processors, the microarchitectural properties of the different types of CPUs cause them to have different instruction-per-cycle (IPC) capabilities. IPC can be higher on some CPUs for advanced instructions.
...
The load balancer can discover the use of advanced instructions and prefer CPUs with higher IPC for tasks running those instructions.
Hardware is free to partition its instruction set into an arbitrary number of classes. It must provide a mechanism identify the class of the currently running task and inform the kernel about the performance of each class of task on each type of CPU.
This patchset introduces the concept of classes of tasks, proposes the interfaces that hardware needs to implement and proposes changes to the load balancer to leverage this extra information in combination with asymmetric packing.
This patchset includes a full implementation for Intel hybrid processors using Intel Thread Director technology.
Since the original patches were posted, a number of code improvements were made stemming from code review and testing. The CONFIG_SCHED_TASK_CLASSES option has been renamed to CONFIG_IPC_CLASSES as one item worth mentioning. This patch series also drops the CONFIG_INTEL_THREAD_DIRECTOR knob. But the rest of the changes are mostly low-level alterations for getting this code into shape.
Those interested in this IPC classes for load balancing with hybrid processors can see the v2 patches now available for testing. As it's 600+ lines of new code and still undergoing review, it's probably not likely it will be squared away in time for the v6.2 kernel merge window opening in two weeks. But hopefully this code and complete Thread Director implementation will be ready to go for a Linux kernel release in the first half of 2023.