]> git.ipfire.org Git - thirdparty/linux.git/commit
sched_ext: Documentation: improve accuracy of task lifecycle pseudo-code
authorKuba Piecuch <jpiecuch@google.com>
Thu, 9 Apr 2026 16:57:44 +0000 (16:57 +0000)
committerTejun Heo <tj@kernel.org>
Fri, 10 Apr 2026 08:30:52 +0000 (22:30 -1000)
commit71ba9a5cb125998a875e3f008cbb28b028b609aa
tree98cf7c341a1c59b12f0c2a2e815de15b759003d9
parentff1befcb168395481fd6a28d8036b707cb7e7a13
sched_ext: Documentation: improve accuracy of task lifecycle pseudo-code

* Add ops.quiescent() and ops.runnable() to the sched_change path.
  When a queued task has one of its scheduling properties changed
  (e.g. nice, affinity), it goes through dequeue() -> quiescent() ->
  (property change callback, e.g. ops.set_weight()) -> runnable() ->
  enqueue().

* Change && to || in ops.enqueue() condition. We want to enqueue tasks
  that have a non-zero slice and are not in any DSQ.

* Call ops.dispatch() and ops.dequeue() only for tasks that have had
  ops.enqueue() called. This is to account for tasks direct-dispatched
  from ops.select_cpu().

* Add a note explaining that the pseudo-code provides a simplified view
  of the task lifecycle and list some examples of cases that the
  pseudo-code does not account for.

Fixes: a4f61f0a1afd ("sched_ext: Documentation: Add ops.dequeue() to task lifecycle")
Signed-off-by: Kuba Piecuch <jpiecuch@google.com>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Documentation/scheduler/sched-ext.rst