A set of patches from Intel are set to be merged for the upcoming Linux 7.3 merge window to enhance the cluster-aware scheduling code so it better handles load balancing on modern Intel Core (Ultra) hybrid CPUs with a mix of P and E/LPE cores. Introduced back in 2021 was cluster-aware scheduling support for what was intended to provide better scheduling support among clusters of CPU cores sharing an L2 cache or other mid-level resources. Back then after it was merged I pointed out regressions with this new scheduling on Intel hybrid CPUs and while improvements have been made since then, cluster aware scheduling has remained sub-optimal for Intel's hybrid processors. For Linux 7.3 though it's looking like it should be in better shape. Intel Linux engineer Ricardo Neri has been leading the latest effort to fix cluster scheduling for processors with asymmetric capacity. He explained in the latest patches: "Cluster scheduling aims to maximize performance by spreading load across clusters of CPUs that share mid-level resources. It works well on uniform systems, but it breaks down on topologies with big and small cores arranged in clusters. As a result, it fails on several generations of Intel processors already shipped and upcoming. ... On a partially busy system (one with idle CPUs; busy CPUs have one task each), scheduling for asymmetric capacity ensures that misfit tasks land on the big CPUs. The remaining tasks, misfit or not, run on the small CPUs. When CONFIG_SCHED_CLUSTER is enabled, these remaining tasks are supposed to be evenly spread among the small-CPU clusters. Today, this does not happen. ... Together, these issues prevent cluster-level balancing on systems with asymmetric CPU capacity. This series addresses each problem and restores the intended behavior. Details, rationale, and code changes are explained in each patch. I tested these patches on Alder Lake, which has both SMT Pcores and clusters of Ecores. I tested with SMT both disabled and enabled. I also tested on Lunar Lake and Panther Lake, which have an Ecore cluster not connected to the L3 cache. I repeated the same experiment with CONFIG_SCHED_CLUSTER disabled. The load balancer behaves as expected." These patches are now queued into tip/tip.git's sched/core GIt branch. With the patches now in a TIP branch, they should be merged for the upcoming Linux 7.3 cycle. No performance numbers were shared on the patches but I'll be running some benchmarks on some Intel Core Ultra processors once the Linux 7.3 cycle is underway for seeing the impact on performance across varying workloads.
Linux 7.3 To Better Handle Cluster Load Balancing On Intel Hybrid CPUs
Full Article
Original Source
Read the full article at Phoronix →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.