Linux Documentation
 help / color / mirror / Atom feed
* [PATCH] docs/scheduler: fix EEVDF-related inaccuracies in the scheduler docs
@ 2026-07-30  3:18 Zhan Xusheng
  0 siblings, 0 replies; only message in thread
From: Zhan Xusheng @ 2026-07-30  3:18 UTC (permalink / raw)
  To: Jonathan Corbet, Ingo Molnar, Peter Zijlstra
  Cc: Juri Lelli, Vincent Guittot, Dietmar Eggemann, Steven Rostedt,
	Ben Segall, Mel Gorman, Valentin Schneider, Shuah Khan, linux-doc,
	linux-kernel, Zhan Xusheng

From: Zhan Xusheng <zhanxusheng@xiaomi.com>

While checking the scheduler documentation against the current code I
found a few inaccuracies:

 - sched-design-CFS.rst still describes the fair class as always running
   the smallest-vruntime ("leftmost") task and references the
   rq->cfs.min_vruntime field.  Since commit 147f3efaa241 ("sched/fair:
   Implement an EEVDF-like scheduling policy") in Linux 6.6 the fair class
   implements EEVDF -- pick_eevdf() selects the eligible task (lag >= 0)
   with the earliest virtual deadline -- and the runqueue's zero-lag
   reference is now cfs_rq->zero_vruntime (the min_vruntime field is gone).
   Add a note that sections 2 and 3 describe the original CFS design and
   no longer match the code, rather than rewriting the historical text.

 - sched-eevdf.rst said Linux 6.6 was released in 2024 (it was 2023) and
   described the per-task slice request as "the new sched_setattr() system
   call".  sched_setattr() has existed since Linux 3.14; the slice is
   carried in the sched_attr::sched_runtime field.  Fix both.

No code changes.

Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
 Documentation/scheduler/sched-design-CFS.rst | 10 ++++++++++
 Documentation/scheduler/sched-eevdf.rst      |  7 ++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/Documentation/scheduler/sched-design-CFS.rst b/Documentation/scheduler/sched-design-CFS.rst
index 03998f6c8f9c..55163506407b 100644
--- a/Documentation/scheduler/sched-design-CFS.rst
+++ b/Documentation/scheduler/sched-design-CFS.rst
@@ -15,6 +15,16 @@ scheduler's SCHED_OTHER interactivity code. Nowadays, CFS is making room
 for EEVDF, for which documentation can be found in
 Documentation/scheduler/sched-eevdf.rst.
 
+.. note::
+
+   Since Linux 6.6 the fair scheduling class implements EEVDF rather than
+   the original CFS algorithm.  The task selection and placement described
+   in sections 2 and 3 below (running the smallest-vruntime / "leftmost"
+   task, and the ``rq->cfs.min_vruntime`` field) describe the original CFS
+   design and no longer match the code: EEVDF picks the *eligible* task
+   with the earliest virtual deadline, and the runqueue's zero-lag
+   reference is now tracked in ``cfs_rq->zero_vruntime``.
+
 80% of CFS's design can be summed up in a single sentence: CFS basically models
 an "ideal, precise multi-tasking CPU" on real hardware.
 
diff --git a/Documentation/scheduler/sched-eevdf.rst b/Documentation/scheduler/sched-eevdf.rst
index 83efe7c0a30d..e3d62de004c6 100644
--- a/Documentation/scheduler/sched-eevdf.rst
+++ b/Documentation/scheduler/sched-eevdf.rst
@@ -4,7 +4,7 @@ EEVDF Scheduler
 
 The "Earliest Eligible Virtual Deadline First" (EEVDF) was first introduced
 in a scientific publication in 1995 [1]. The Linux kernel began
-transitioning to EEVDF in version 6.6 (as a new option in 2024), moving
+transitioning to EEVDF in version 6.6 (released in 2023), moving
 away from the earlier Completely Fair Scheduler (CFS) in favor of a version
 of EEVDF proposed by Peter Zijlstra in 2023 [2-4]. More information
 regarding CFS can be found in
@@ -28,8 +28,9 @@ by sleeping briefly to reset their negative lag: when a task sleeps, it
 remains on the run queue but marked for "deferred dequeue," allowing its
 lag to decay over VRT. Hence, long-sleeping tasks eventually have their lag
 reset. Finally, tasks can preempt others if their VD is earlier, and tasks
-can request specific time slices using the new sched_setattr() system call,
-which further facilitates the job of latency-sensitive applications.
+can request specific time slices via the ``sched_runtime`` field of the
+sched_setattr() system call, which further facilitates the job of
+latency-sensitive applications.
 
 REFERENCES
 ==========
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-30  3:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30  3:18 [PATCH] docs/scheduler: fix EEVDF-related inaccuracies in the scheduler docs Zhan Xusheng

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