[PATCH 0/3] sched: Fix load accounting and improve imbalance calculation

From: Srikar Dronamraju

Date: Thu Nov 19 2026 - 19:37:22 EST


This series contains a few independent scheduler fixes and cleanups.

The first patch corrects load accounting in update_sg_lb_stats() by
excluding delayed-dequeued tasks from sum_nr_running. Delayed-dequeued
tasks remain visible in rq->nr_running even though they are no longer
runnable, causing load balancing statistics to overestimate runnable
load.

The second patch improves imbalance calculation for domains containing
groups with different numbers of cores. Idle CPU counts alone can be
misleading in such cases since larger groups naturally contain more idle
CPUs even when they are proportionally more heavily loaded. Use the
runnable task distribution for imbalance calculation when comparing
groups of differing sizes.

The final patch is a cleanup of cache_nice_tries initialization during
sched-domain construction. The resulting values remain unchanged but the
initialization becomes simpler and easier to follow.

Patches 1 and 2 contain functional fixes while patch 3 is a cleanup.

Srikar Dronamraju (3):
sched/fair: Exclude delayed-dequeued tasks from sum_nr_running
sched/fair: Use runnable task imbalance for asymmetric groups
sched/topology: Simplify cache_nice_tries initialization

kernel/sched/fair.c | 5 +++--
kernel/sched/topology.c | 9 ++-------
2 files changed, 5 insertions(+), 9 deletions(-)

--
2.55.0