lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKfTPtDQ-Oe6RTBJtWhzVmgc-vxChsDLasS8xLhHfRK+LsJFwA@mail.gmail.com>
Date: Fri, 23 Jan 2026 12:35:44 +0100
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Ryan Roberts <ryan.roberts@....com>
Cc: Peter Zijlstra <peterz@...radead.org>, 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 12:32, Ryan Roberts <ryan.roberts@....com> wrote:
>
> On 23/01/2026 10:42, Vincent Guittot wrote:
> > On Fri, 23 Jan 2026 at 11:09, Peter Zijlstra <peterz@...radead.org> wrote:
> >>
> >> On Fri, Jan 23, 2026 at 11:04:20AM +0100, Vincent Guittot wrote:
> >>> 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
> >>
> >> Sure that works. Then I'll stick both into tip/sched/urgent or
> >> thereabout :-)
> >
> > I sent it.
> > https://lore.kernel.org/all/20260123102858.52428-1-vincent.guittot@linaro.org/
>
> This is needed in addition to Mel's patch to disable NEXT_BUDDY, right? I'll
> kick off another benchmark run and report back on Monday.

Yes, this is in addition to disabling NEXT_BUDDY.
Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ