Intel Posts Big Linux Patch Set For "Classes of Tasks" On Hybrid CPUs, Thread Director

Written by Michael Larabel in Intel on 10 September 2022 at 06:40 AM EDT. 33 Comments
INTEL --
Sent out as a "request for comments" on Friday night was a new patch series out of Intel introducing the notion of "classes of tasks" for the Linux kernel so that the scheduler can make better decisions on hybrid processors like with Intel's Alder Lake processors and upcoming Raptor Lake. This also provides a more complete implementation of Intel Thread Director for Linux and may also be used as the basis for instruction set differences between the performance and efficient cores.

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 Hardware Feedback Interface and other changes spearheaded by Intel over the past year to make the Linux kernel better suited for their hybrid processors.


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.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com 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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week