[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2841a37f-a6d2-44dc-9578-b40804e960d0@linux.ibm.com>
Date: Thu, 13 Nov 2025 13:56:13 +0530
From: Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Mel Gorman <mgorman@...hsingularity.net>, Ingo Molnar <mingo@...hat.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,
Madadi Vineeth Reddy <vineethr@...ux.ibm.com>
Subject: Re: [PATCH 2/2] sched/fair: Reimplement NEXT_BUDDY to align with
EEVDF goals
Hi Peter,
On 12/11/25 20:18, Peter Zijlstra wrote:
> On Wed, Nov 12, 2025 at 12:25:21PM +0000, Mel Gorman wrote:
>
>> + /* Prefer picking wakee soon if appropriate. */
>> + if (sched_feat(NEXT_BUDDY) &&
>> + set_preempt_buddy(cfs_rq, wake_flags, pse, se)) {
>> +
>> + /*
>> + * Decide whether to obey WF_SYNC hint for a new buddy. Old
>> + * buddies are ignored as they may not be relevant to the
>> + * waker and less likely to be cache hot.
>> + */
>> + if (wake_flags & WF_SYNC)
>> + preempt_action = preempt_sync(rq, wake_flags, pse, se);
>> + }
>
> Why only do preempt_sync() when NEXT_BUDDY? Nothing there seems to
> depend on buddies.
IIUC, calling preempt_sync() Without NEXT_BUDDY would force a reschedule after the threshold,
but no buddy would be set. This means pick_eevdf() would run with normal EEVDF deadline selection,
potentially picking a different task instead of the wakee.The forced reschedule would accomplish
nothing for the wakees.
That said, I see your point that the WF_SYNC threshold check could still reduce context switch
overhead even without guaranteeing wakee selection.
Thanks,
Madadi Vineeth Reddy
Powered by blists - more mailing lists