Intel Alder Lake's Thread Director Support Coming to Linux
Performance uplift on the horizon
Intel has published a new patch series for its Linux drivers that promise to improve the performance of its hybrid Alder Lake processors by optimizing usage of (P)erformance and (E)fficiency cores.
When Intel released its 12th Generation Core 'Alder Lake' processors earlier this year, it quickly turned out that the new CPUs perform better under Windows rather than under Linux. Unlike Windows 11, Linux does not have proper support for Intel's Thread Director technology based on the Enhanced Hardware Feedback Interface (HFI), which enables the OS to utilize high-performance Golden Cove and energy-efficient Gracemont cores properly.
At present, the Linux kernel decides when to use P or E cores using the ITMT/Turbo Boost Max 3.0 driver that relies on the information exposed by the firmware, reports Phoronix. Essentially, this means that under Linux, the OS in many cases prefers the fastest cores (i.e., Golden Coves at high clocks) and underutilizes energy-efficient cores.
By contrast, HFI communicates numeric performance and numeric power efficiency capabilities of each CPU core in a 0 – 255 range to the OS in real-time. Suppose either the performance or energy capabilities efficiency of a CPU is 0. In that case, the hardware dynamically adapts to the current instruction mix and recommends not scheduling any tasks on such core for performance, energy efficiency, or thermal reasons, respectively.
Here is how Intel describes it:
The Intel Hardware Feedback Interface (HFI) provides information about the performance and energy efficiency of each CPU in the system. It uses a table that is shared between hardware and the operating system. The contents of the table may be updated as a result of changes in the operating conditions of the system (e.g., reaching a thermal limit) or the action of external factors (e.g., changes in the thermal design power).
The information that HFI provides are specified as numeric, unit-less capabilities relative to other CPUs in the system. These capabilities have a range of [0-255] where higher numbers represent higher capabilities. Energy efficiency and performance are reported in separate capabilities. If either the performance or energy capabilities efficiency of a CPU are 0, the hardware recommends to not schedule any tasks on such CPU for performance, energy efficiency or thermal reasons, respectively.
Stay On the Cutting Edge: Get the Tom's Hardware Newsletter
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
The kernel or user space may use the information from the HFI to modify task placement and/or adjust power limits. This patchset focuses on the user space. The thermal notification framework is extended to relay updates of CPU capacity. Thus, a userspace daemon can affinitize workloads to certain CPUs and/or offline CPUs whose capabilities are zero.
The frequency of HFI updates is specific to each processor model. On some systems, there is just a single HFI update at boot. On other systems, there may be updates every tens of milliseconds. In order to not overwhelm userspace with too many updates, they are limited to one update every CONFIG_HZ jiffies.
The new patches are still in revision, so it is unclear whether they will be implemented by the upcoming Linux 5.17 or delayed further into 2022.
Anton Shilov is a contributing writer at Tom’s Hardware. Over the past couple of decades, he has covered everything from CPUs and GPUs to supercomputers and from modern process technologies and latest fab tools to high-tech industry trends.
Intel Arrow Lake T-Series CPUs show tiny improvement over prior-gen — 65W and 35W Core Ultra 7 265 and Ultra 7 265T CPUs are only 5% faster than Raptor Lake in CrossMark
Intel won't bring 3D V-Cache-like tech to consumer CPUs for now — next-gen Clearwater Forest Xeon CPUs will feature "Local Cache" in the base tile akin to AMD's 3D V-Cache