]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sched_ext: Documentation: add note about multiple ops.enqueue() calls in a row
authorKuba Piecuch <jpiecuch@google.com>
Mon, 20 Apr 2026 15:28:47 +0000 (15:28 +0000)
committerTejun Heo <tj@kernel.org>
Mon, 20 Apr 2026 17:56:50 +0000 (07:56 -1000)
Commit 84b1a0ea0b7c
("sched_ext: Implement scx_bpf_dsq_reenq() for user DSQs")
introduced the possibility of ops.enqueue() being called multiple times
in a row for the same task without intervening calls to ops.dequeue().
Document this behavior as it may be surprising to some.

Acked-by: Andrea Righi <arighi@nvidia.com>
Acked-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Signed-off-by: Kuba Piecuch <jpiecuch@google.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Documentation/scheduler/sched-ext.rst

index 03d595d178ea4fa456f86426461366198d414be9..fba09aa1cd4e7648d8165446e00a5bf3ac32a16a 100644 (file)
@@ -339,6 +339,11 @@ The following briefly shows how a waking task is scheduled and executed.
      leaves (e.g., when ``ops.dispatch()`` moves it to a terminal DSQ, or
      on property change / sleep).
 
+   Note that ``ops.enqueue()`` can be called multiple times in a row without
+   an intervening call to ``ops.dequeue()``. This can happen, for example,
+   when a task on a user-created DSQ is re-enqueued using
+   ``scx_bpf_dsq_reenq()``. The task stays in BPF custody the entire time.
+
    When a task leaves BPF scheduler custody, ``ops.dequeue()`` is invoked.
    The dequeue can happen for different reasons, distinguished by flags: