Re: [tip: sched/core] sched: Clarify WF_SYNC wakeup semantics

From: Ingo Molnar

Date: Fri Sep 25 2026 - 14:36:45 EST



* tip-bot2 for Shubhang Kaushik (Ampere) <tip-bot2@xxxxxxxxxxxxx> wrote:

> The following commit has been merged into the sched/core branch of tip:
>
> Commit-ID: e4c353c3933968fe8efecb269fdbe3baa1d1ddd0
> Gitweb: https://git.kernel.org/tip/e4c353c3933968fe8efecb269fdbe3baa1d1ddd0
> Author: Shubhang Kaushik (Ampere) <sh@xxxxxxxxxx>
> AuthorDate: Tue, 22 Sep 2026 14:57:05 -07:00
> Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> CommitterDate: Fri, 25 Sep 2026 12:45:59 +02:00
>
> sched: Clarify WF_SYNC wakeup semantics
>
> The synchronous waitqueue wakeup comments currently state that a
> synchronous wakee will not be migrated to another CPU. This is not
> guaranteed by the scheduler wakeup path.
>
> WF_SYNC is an advisory hint that the caller expects the waker to
> schedule away soon. Scheduler classes may use it for placement or
> preemption, but callers must not rely on it to prevent migration,
> preserve CPU locality, or make the wakee run next.
>
> Keep this contract next to the flag definition, remove the stale
> waitqueue wording, and make the locked helper refer to the unlocked
> variant.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> Link: https://patch.msgid.link/20260922-sched-wf-sync-doc-v3-1-23ebe9e27bef@xxxxxxxxxx

JFYI, I've added Shubhang's SOB which is missing from the commit:

Signed-off-by: Shubhang Kaushik (Ampere) <sh@xxxxxxxxxx>

Which I suppose got lost in some patch application mishap,
because it's present in the original.

Thanks,

Ingo