Re: [PATCH] sched/fair: Fix flat hierarchy
From: Vincent Guittot
Date: Fri Aug 14 2026 - 10:31:33 EST
On Fri, 14 Aug 2026 at 16:16, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Fri, Aug 14, 2026 at 02:51:20PM +0200, Vincent Guittot wrote:
> > On Fri, 14 Aug 2026 at 13:22, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> > >
> > > On Fri, Aug 14, 2026 at 11:26:13AM +0200, Vincent Guittot wrote:
> > >
> > > > For the enqueue, the 1st requeue_delayed_entity() which is the main
> > > > path for delayed task, requires the update. Then another one before
> > > > reweight_eevdf(cfs_rq, se, weight, false); in the !curr case.
> > > >
> > > > But I'm not sure we want to spread this in different places.
> > >
> > > Fair enough. I'll test the below and then push to sched/urgent.
> >
> > I tested this patch on sched/core.
> >
> > That being said, 7.2 wants something like below for requeued_delayed_entity()
> >
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index fd3edf72fb6e..3defda0e2f83 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -7802,6 +7802,8 @@ requeue_delayed_entity(struct sched_entity *se)
> > WARN_ON_ONCE(!se->sched_delayed);
> > WARN_ON_ONCE(!se->on_rq);
> >
> > + update_curr(cfs_rq);
> > +
> > if (update_entity_lag(cfs_rq, se)) {
> > cfs_rq->nr_queued--;
> > if (se != cfs_rq->curr)
> >
> > So I would put the cahnge above in sched/urgent and the patch
> > discussed here in sched/core
>
> Right. I've pushed out sched/urgent and sched/core to queue.git. If you
> could double check that, I'll push them out to tip later today.
Both look good to me. Thanks
>
> For now, I'm going to go melt someplace outside for a bit.
Enjoy :-)