mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhan Xusheng <zhanxusheng1024@gmail.com>
To: Jonathan Corbet <corbet@lwn.net>, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Valentin Schneider <vschneid@redhat.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zhan Xusheng <zhanxusheng@xiaomi.com>
Subject: [PATCH] docs/scheduler: fix EEVDF-related inaccuracies in the scheduler docs
Date: Thu, 30 Jul 2026 11:18:33 +0800	[thread overview]
Message-ID: <20260730031833.2228115-1-zhanxusheng1024@gmail.com> (raw)

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


                 reply	other threads:[~2026-07-30  3:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260730031833.2228115-1-zhanxusheng1024@gmail.com \
    --to=zhanxusheng1024@gmail.com \
    --cc=bsegall@google.com \
    --cc=corbet@lwn.net \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=skhan@linuxfoundation.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=zhanxusheng@xiaomi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®