[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e324cf4d-6bfa-4f76-b592-84b1a17ed22e@arm.com>
Date: Fri, 23 Jan 2026 11:32:51 +0000
From: Ryan Roberts <ryan.roberts@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: 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 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.
Powered by blists - more mailing lists