[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKfTPtBp6p+JC1J-oKXT6eLY41M71bhofq=zpLCQFGsVXEEgyg@mail.gmail.com>
Date: Fri, 23 Jan 2026 11:04:20 +0100
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ryan Roberts <ryan.roberts@....com>, Mel Gorman <mgorman@...hsingularity.net>,
Ingo Molnar <mingo@...hat.com>, Madadi Vineeth Reddy <vineethr@...ux.ibm.com>,
Juri Lelli <juri.lelli@...hat.com>, Dietmar Eggemann <dietmar.eggemann@....com>,
Valentin Schneider <vschneid@...hat.com>, Chris Mason <clm@...a.com>, linux-kernel@...r.kernel.org,
Christian.Loehle@....com
Subject: Re: [PATCH] sched/fair: Disable scheduler feature NEXT_BUDDY
On Fri, 23 Jan 2026 at 10:53, Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Thu, Jan 22, 2026 at 06:34:28PM +0100, Vincent Guittot wrote:
>
> > The new NEXT_BUDDY implementation is doing more than setting a buddy;
> > it also breaks the run to parity mechanism by always setting next
> > buddy during wakeup_preempt_fair() even if there is no relation
> > between the 2 tasks and PICK_BUDDY bypasses protections
> >
> > In addition to disable NEXT_BUDDY, i suggest to also revert the force
> > preemption section below which also breaks run_to_parity by doing an
> > assumption whereas WF_SYNC is normally there for such purpose
> >
> > -- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -8822,16 +8822,6 @@ static void wakeup_preempt_fair(struct rq *rq,
> > struct task_struct *p, int wake_f
> > if ((wake_flags & WF_FORK) || pse->sched_delayed)
> > return;
> >
> > - /*
> > - * If @p potentially is completing work required by current then
> > - * consider preemption.
> > - *
> > - * Reschedule if waker is no longer eligible. */
> > - if (in_task() && !entity_eligible(cfs_rq, se)) {
> > - preempt_action = PREEMPT_WAKEUP_RESCHED;
> > - goto preempt;
> > - }
> > -
> > /* Prefer picking wakee soon if appropriate. */
> > if (sched_feat(NEXT_BUDDY) &&
> > set_preempt_buddy(cfs_rq, wake_flags, pse, se)) {
> >
> > This largely increases the number of resched and preemption because a
> > task becomes quickly "ineligible": We update our internal vruntime
> > periodically and before the task exhausted its slice.
>
> Hmm, fair enough. Do I munge that into Mel's patch, or should I create a
> second patch from you for this?
I can prepare a patch with description and sent it right now if you want
Powered by blists - more mailing lists