[RFC PATCH 0/2] sched: Document WF_SYNC wakeup placement semantics

From: Shubhang Kaushik (Ampere)

Date: Tue Aug 25 2026 - 20:00:33 EST


WF_SYNC is passed by synchronous waitqueue wakeup helpers when the
caller expects the waker to schedule away soon. Its fair-class semantics
are not documented.

In particular, the waitqueue API comments state that a synchronous wakee
will not be migrated to another CPU. This is not guaranteed by the
current wakeup path. For a blocked fair-class wakee, wake_affine() can
select the waking CPU, but select_idle_sibling() can select another
eligible CPU.

Document the current fair-class CPU-selection and wakeup-preemption
behavior. Also correct the stale waitqueue API comments.

This series does not change scheduler behavior. It documents WF_SYNC as
a non-binding fair-class hint and does not define a stronger placement
policy.

Signed-off-by: Shubhang Kaushik (Ampere) <sh@xxxxxxxxxx>
---
Shubhang Kaushik (Ampere) (2):
sched: Document WF_SYNC wakeup placement semantics
sched/wait: Clarify WF_SYNC wakeup semantics

Documentation/scheduler/index.rst | 1 +
Documentation/scheduler/sched-wake-affinity.rst | 133 ++++++++++++++++++++++++
kernel/sched/wait.c | 30 +++---
3 files changed, 150 insertions(+), 14 deletions(-)
---
base-commit: 66498c75b4f8017f62d720d9b59675bdf3abce91
change-id: 20260824-sched-wf-sync-doc-e92b4fe987f7

Best regards,
--
Shubhang Kaushik (Ampere) <sh@xxxxxxxxxx>