Re: [PATCH 2/2] sched/fair: Reimplement NEXT_BUDDY to align with EEVDF goals
From: Peter Zijlstra
Date: Wed Nov 12 2025 - 09:48:29 EST
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.