Intel Posts Big Linux Patch Set For "Classes of Tasks" On Hybrid CPUs, Thread Director
The set of 23 patches sent out last night are under the umbrella of introducing the concept of classes of tasks for load balancing. This builds off the existing Intel Linux work on the
The patch series cover letter sums things up as:
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 Alder Lake launch we've seen Intel make a number of improvements to Linux for ensuring the hybrid processor design is better handled by the kernel, while only now we are seeing this "full" Thread Director implementation, including finally exposing "Intel Thread Director" as a Kconfig kernel option.
This work is important for ensuring the tasks expected to be high performance are actually placed on the P cores and less important classes of work can be spun on the E cores. Building upon this "classes of tasks" work may also prove critical for future Intel CPU generations where there may be more instruction set differences between the P/E cores such as if AVX-512 or other advanced instructions were to make a return to P cores in a hybrid configuration. Alder Lake has been running well on Linux particularly with kernel releases from this year that have picked up / back-ported various improvements, so it will be interesting to see how much benefit this big new patch series is for current ADL processors or if it's really more pressing for Thread Director improvements coming with Raptor Lake or even Meteor Lake.
It will be interesting to see how this new patch series pans out for Alder Lake. Once the patch work settles down a bit more, I'll be sure to try it out on some of my boxes. Though given that it's only now being published and is under a "RFC" flag while the v6.1 merge window is only a few weeks away, it's quite likely this patch series won't be readied for a Linux kernel release until into 2023.