diff options
| author | Kuba Piecuch <jpiecuch@google.com> | 2026-04-20 15:28:47 +0000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-04-20 07:56:50 -1000 |
| commit | d722d70a8be441df1c3e3e9be454d99f527f93d5 (patch) | |
| tree | 236fb3bdd48079a16ed7b1262e0a92e47a4d71af | |
| parent | 41e3312861eafba171d9620150aaf2e99165d044 (diff) | |
| download | linux-d722d70a8be441df1c3e3e9be454d99f527f93d5.tar.gz linux-d722d70a8be441df1c3e3e9be454d99f527f93d5.zip | |
sched_ext: Documentation: add note about multiple ops.enqueue() calls in a row
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>
| -rw-r--r-- | Documentation/scheduler/sched-ext.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/scheduler/sched-ext.rst b/Documentation/scheduler/sched-ext.rst index 03d595d178ea..fba09aa1cd4e 100644 --- a/Documentation/scheduler/sched-ext.rst +++ b/Documentation/scheduler/sched-ext.rst @@ -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: |
