Linux 6.9 Lands Reworked Topology Code For Better Hybrid CPU Support

Written by Michael Larabel in Linux Kernel on 12 March 2024 at 11:37 AM EDT. 3 Comments
LINUX KERNEL
The recently covered overhaul of the x86 CPU topology code to clean-up quite a code mess has been merged for Linux 6.9. Among other benefits, this improved topology code properly accounts for modern Intel Core hybrid systems with a mix of P and HT-less E cores.

Sent in and merged on Monday was the "x86/apic" changes from TIP.git that overhaul the topology code. As explained by Thomas Gleixner in the pull request:
Rework of APIC enumeration and topology evaluation:

The current implementation has a couple of shortcomings:

- It fails to handle hybrid systems correctly.

- The APIC registration code which handles CPU number assignments is in the middle of the APIC code and detached from the topology evaluation.

- The various mechanisms which enumerate APICs, ACPI, MPPARSE and guest specific ones, tweak global variables as they see fit or in case of XENPV just hack around the generic mechanisms completely.

- The CPUID topology evaluation code is sprinkled all over the vendor code and reevaluates global variables on every hotplug operation.

- There is no way to analyze topology on the boot CPU before bringing up the APs. This causes problems for infrastructure like PERF which needs to size certain aspects upfront or could be simplified if that would be possible.

- The APIC admission and CPU number association logic is incomprehensible and overly complex and needs to be kept around after boot instead of completing this right after the APIC enumeration.

This update addresses these shortcomings.

This pull request has all the details on this big rework that consists of 76 patches. The code has been extensively tested so hopefully none -- or minimal -- fallout.

Intel hybrid CPU


Linux 6.9 is shaping up to be quite a feature-packed release that will be out as stable around the middle of the year.
Related News
About The Author
Michael Larabel

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