Linux Fix On The Way For A Scheduler Imbalance Overflow Issue

Written by Michael Larabel in Linux Kernel on 16 April 2023 at 09:00 AM EDT. 33 Comments
LINUX KERNEL
Sent in this morning for Linux 6.3 is a Linux CPU scheduler fix to deal with an imbalancing issue that's been present in the mainline kernel since a scheduler rework that landed back in late 2019.

Vincent Guittot of Linaro sent in the fix to deal with an imbalance overflow issue. Vincent explained, "When local group is fully busy but its average load is above system load, computing the imbalance will overflow and local group is not the best target for pulling this load."

Intel Xeon Scalable CPUs


The issue has been present in the mainline kernel since October 2019. While the fix is from a Linaro engineer, the issue was uncovered on an Intel Xeon Scalable Sapphire Rapids server. A mailing list post further outlines this issue due to the integer overflow bug:
"The algorithm is designed to pull some tasks from the busiest group to the local group. But when both groups are or will become overloaded, the algorithm doesn't want to push the local group above the average load of the sched domain. However, in some cases, the calculation of imbalance can be wrong, causing meaningless migration and even amplifying the imbalance."

The fix was sent in this morning as a sched/urgent pull ahead of the Linux 6.3-rc7 kernel being released later today. The fix is to not try pulling any tasks away from the local group if it is more loaded than the average system load. Once picked up by mainline it should in turn be back-ported to recent stable Linux kernel versions as well.
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