mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/2] sched: Document WF_SYNC wakeup placement semantics
@ 2026-09-17 20:43 Shubhang Kaushik (Ampere)
  2026-09-17 20:43 ` [RFC PATCH v2 1/2] " Shubhang Kaushik (Ampere)
  2026-09-17 20:43 ` [RFC PATCH v2 2/2] sched/wait: Clarify WF_SYNC wakeup semantics Shubhang Kaushik (Ampere)
  0 siblings, 2 replies; 6+ messages in thread
From: Shubhang Kaushik (Ampere) @ 2026-09-17 20:43 UTC (permalink / raw)
  To: Jonathan Corbet, Shuah Khan, Randy Dunlap, Ingo Molnar,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
	K Prateek Nayak, Shubhang Kaushik, Shrikanth Hegde,
	Madadi Vineeth Reddy, Christopher Lameter
  Cc: linux-doc, linux-kernel, Shubhang Kaushik (Ampere)

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.

Document the current fair class WF_SYNC semantics and correct the stale
waitqueue API comments. WF_SYNC is a non-binding hint that can influence
placement and preemption, but does not guarantee CPU locality, avoidance
of migration, or immediate wakee preemption.

This series does not change scheduler behavior or define a stronger
WF_SYNC placement policy.

Signed-off-by: Shubhang Kaushik (Ampere) <sh@gentwo.org>
---
Changes in v2:
  - Describe stable WF_SYNC semantics rather than scheduler implementation flow.
  - Remove helper names, predicates, and CPU-selection details.
  - Clarify custom wake function handling and WF_SYNC placement and
    preemption limitations.

Link to v1: https://lore.kernel.org/r/20260825-sched-wf-sync-doc-v1-0-f899edb44ff5@gentwo.org

---
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 | 67 +++++++++++++++++++++++++
 kernel/sched/wait.c                             | 30 +++++------
 3 files changed, 84 insertions(+), 14 deletions(-)
---
base-commit: b5a051f6b840d48f159166ef073d3021989bfb50
change-id: 20260824-sched-wf-sync-doc-e92b4fe987f7

Best regards,
-- 
Shubhang Kaushik (Ampere) <sh@gentwo.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-18 13:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 20:43 [RFC PATCH v2 0/2] sched: Document WF_SYNC wakeup placement semantics Shubhang Kaushik (Ampere)
2026-09-17 20:43 ` [RFC PATCH v2 1/2] " Shubhang Kaushik (Ampere)
2026-09-18 11:33   ` Peter Zijlstra
2026-09-18 13:55     ` Shrikanth Hegde
2026-09-17 20:43 ` [RFC PATCH v2 2/2] sched/wait: Clarify WF_SYNC wakeup semantics Shubhang Kaushik (Ampere)
2026-09-18 11:37   ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®