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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260123095305.GH171111@noisy.programming.kicks-ass.net>
Date: Fri, 23 Jan 2026 10:53:05 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Vincent Guittot <vincent.guittot@...aro.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 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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ