Re: [PATCH 4/4] sched/fair: Rework/fix task_h_load()

From: Vincent Guittot

Date: Wed Sep 02 2026 - 06:50:22 EST


On Wed, 2 Sept 2026 at 12:37, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Wed, Sep 02, 2026 at 10:13:01AM +0200, Peter Zijlstra wrote:
>
> > Let me go and try and reproduce.
>
> Different physical machine.. *splat*, virtual machine it lives. Argh I
> hate computers.
>
> Anyway, confirmed on physical machine that triggered it, the blow seems
> to cure things. I'll fold it in.
>
> ---
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -15287,9 +15287,6 @@ static void set_next_task_fair(struct rq
> weight = __calc_prop_weight(cfs_rq, se, weight);
> }
>
> - for_each_sched_entity_bl(se, cfs_rq)
> - update_cfs_rq_h_load(group_cfs_rq(se), se, cfs_rq);
> -
> if (throttled)
> task_throttle_setup_work(p);
>
> @@ -15309,11 +15306,15 @@ static void set_next_task_fair(struct rq
> */
> list_move(&se->group_node, &rq->cfs_tasks);
> }
> - if (!first)
> - return;
>
> WARN_ON_ONCE(se->sched_delayed);
>
> + for_each_sched_entity_bl(se, cfs_rq)
> + update_cfs_rq_h_load(group_cfs_rq(se), se, cfs_rq);
> +

should work too

> + if (!first)
> + return;
> +
> if (hrtick_enabled_fair(rq))
> hrtick_start_fair(rq, p);
>
>
>