Skip to content

sched: Fix load accounting and improve imbalance calculation

Srikar Dronamraju lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 3 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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