Re: [PATCH 1/3] sched/fair: Exclude delayed-dequeued tasks from sum_nr_running
From: Srikar Dronamraju
Date: Thu Dec 03 2026 - 11:42:30 EST
* Srikar Dronamraju <srikar@xxxxxxxxxxxxx> [2026-11-20 07:19:48]:
Hi Ingo, Peter
> Delayed dequeue keeps a sleeping task on the CFS runqueue until its
> accumulated lag is repaid. While such tasks remain accounted in
> rq->nr_running, they are no longer runnable and are not eligible to
> consume CPU time.
>
> update_sg_lb_stats() currently uses rq->nr_running when computing
> sum_nr_running. As a result, delayed-dequeued tasks contribute to group
> load statistics even though they are effectively sleeping. This can
> inflate the apparent load of a group and influence load balancing
> decisions.
>
> Other metrics collected by update_sg_lb_stats(), such as group_runnable
> and h_nr_runnable, already focus on runnable work. Counting delayed
> entities in sum_nr_running makes it inconsistent with the rest of the
> load-balancing statistics.
>
> Exclude cfs_h_nr_delayed() tasks from sum_nr_running so that load
> balancing decisions are based on runnable tasks rather than entities
> waiting to complete delayed dequeue accounting.
>
> Signed-off-by: Srikar Dronamraju <srikar@xxxxxxxxxxxxx>
> ---
Are there any comments, updates that I need to fix or are there any
objections to the patches?
--
Thanks and Regards
Srikar Dronamraju