sched_ext: minor doc and comment fixes
Subsystems (3)
cover sched_ext: minor doc and comment fixes
From: Tao Cui <[email protected]>
Two small doc and comment fixes noticed while
reading the code. No functional changes.
Tao Cui (2):
Documentation: sched_ext: fix events sysfs path and show_state example
sched_ext: fix stale references in doc comments
Documentation/scheduler/sched-ext.rst | 9 +++++---- kernel/sched/ext/inlines.h | 2 +- kernel/sched/ext/internal.h | 5 ++--- 3 files changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/2 Documentation: sched_ext: fix events sysfs path and show_state example
From: Tao Cui <[email protected]>
The events file is under the scheduler's sysfs kobject (/sys/kernel/sched_ext/root/events for the root scheduler), not the nonexistent "<scheduler-name>/events" path. Also add the missing "aborting" line to the scx_show_state.py example.
--- Documentation/scheduler/sched-ext.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
Documentation/scheduler/sched-ext.rst +5 -4
@@ -93,13 +93,13 @@ scheduler has been loaded): # cat /sys/kernel/sched_ext/enable_seq 1 -Each running scheduler also exposes a per-scheduler ``events`` file under -``/sys/kernel/sched_ext/<scheduler-name>/events`` that tracks diagnostic -counters. Each counter occupies one ``name value`` line: +Each running scheduler exposes an ``events`` file under its sysfs kobject +(``/sys/kernel/sched_ext/root/events`` for the root scheduler) that tracks +diagnostic counters. Each counter occupies one ``name value`` line: .. code-block:: none - # cat /sys/kernel/sched_ext/simple/events + # cat /sys/kernel/sched_ext/root/events SCX_EV_SELECT_CPU_FALLBACK 0 SCX_EV_DISPATCH_LOCAL_DSQ_OFFLINE 0 SCX_EV_DISPATCH_KEEP_LAST 123
@@ -153,6 +153,7 @@ detailed information: switching_all : 1 switched_all : 1 enable_state : enabled (2) + aborting : 0 bypass_depth : 0 nr_rejected : 0 enable_seq : 1
Signature · 1 line
2.43.0
PATCH 2/2 sched_ext: fix stale references in doc comments
In reply to Tao CuiFrom: Tao Cui <[email protected]>
- scx_bpf_dispatch() was renamed to scx_bpf_dsq_insert()
- drop reference to undefined %SCX_DEQ_SAVE
- @name is in /sys/kernel/sched_ext/root/ops, not a sysctl
--- kernel/sched/ext/inlines.h | 2 +- kernel/sched/ext/internal.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-)
kernel/sched/ext/inlines.h +1 -1
@@ -14,7 +14,7 @@#include "cid.h" /* -* One user of this function is scx_bpf_dispatch() which can be called +* One user of this function is scx_bpf_dsq_insert() which can be called * recursively as sub-sched dispatches nest. Always inline to reduce stack usage * from the call frame. */
kernel/sched/ext/internal.h +2 -3
@@ -485,7 +485,6 @@ struct sched_ext_ops {* - sleeping (%SCX_DEQ_SLEEP) * - being moved to another CPU * - being temporarily taken off the queue for an attribute change -* (%SCX_DEQ_SAVE) * * This and ->dequeue() are related but not coupled. This operation * notifies @p's state transition and may not be preceded by ->dequeue()
@@ -966,8 +965,8 @@ struct sched_ext_ops {* @name: BPF scheduler's name * * Must be a non-zero valid BPF object name including only isalnum(), -* '_' and '.' chars. Shows up in kernel.sched_ext_ops sysctl while the -* BPF scheduler is enabled. +* '_' and '.' chars. Exposed via +* /sys/kernel/sched_ext/root/ops while the BPF scheduler is enabled. */ char name[SCX_OPS_NAME_LEN ];
Signature · 1 line
2.43.0
Tejun Heo
reviewerRe: [PATCH 1/2] Documentation: sched_ext: fix events sysfs path and show_state example
In reply to Tao CuiHello, Tao.
On Tue, Aug 11, 2026 at 03:38:00PM +0800, Tao Cui wrote:
...
Documentation/scheduler/sched-ext.rst detailed information: · line 159
Quoted 8 lines
Documentation/scheduler/sched-ext.rst +1
-0@@ -153,6 +153,7 @@ detailed information: switching_all : 1 switched_all : 1 enable_state : enabled (2) + aborting : 0 bypass_depth : 0 nr_rejected : 0 enable_seq : 1
scx_root->aborting is a bool and drgn prints Python bools, so the actual
output here is "aborting : False". Other than that, looks good.
Thanks.
Signature · 1 line
tejun
Tejun Heo
reviewerRe: [PATCH 2/2] sched_ext: fix stale references in doc comments
In reply to Tao CuiHello, Tao.
Quoted 4 lines · Tao Cui
- * One user of this function is
scx_bpf_dispatch()which can be called
+ * One user of this function isscx_bpf_dsq_insert()which can be called
* recursively as sub-sched dispatches nest. Always inline to reduce stack usage
* from the call frame.
This one isn't a leftover of the scx_bpf_dispatch() rename. scx_bpf_dsq_insert() doesn't call scx_dispatch_sched() and can't nest. The comment is a typo for scx_bpf_sub_dispatch(), which a parent's ops.dispatch() calls to trigger dispatching on a child scheduler, so the calls nest as sub-scheds do. Please use scx_bpf_sub_dispatch() instead.
kernel/sched/ext/internal.h struct sched_ext_ops { · line 488
Quoted 4 lines
* - sleeping (%SCX_DEQ_SLEEP)
* - being moved to another CPU
* - being temporarily taken off the queue for an attribute changekernel/sched/ext/internal.h +0
-1-* (%SCX_DEQ_SAVE)
SCX_DEQ_SAVE was never defined, but these dequeues are flagged with %SCX_DEQ_SCHED_CHANGE which ops.quiescent() does receive. Please replace the reference instead of dropping it.
kernel/sched/ext/internal.h struct sched_ext_ops { · line 969
Quoted 2 lines
kernel/sched/ext/internal.h +2
-0+* '_' and '.' chars. Exposed via +* /sys/kernel/sched_ext/root/ops while the BPF scheduler is enabled.
@name applies to sub-schedulers too and they show it the same way under their own directories. Maybe something like "Exposed via the ops file in the scheduler's sysfs directory, /sys/kernel/sched_ext/root/ops for the root scheduler, while the BPF scheduler is enabled."
The first hunk no longer applies to sched_ext/for-7.3. Please base v2 on that branch.
Thanks.
Signature · 1 line
tejun
Re: [PATCH 2/2] sched_ext: fix stale references in doc comments
Hello, Tejun.
Quoted 8 lines · Tejun Heo
Hello, Tao.
Quoted 4 lines · Tao Cui
- * One user of this function is
scx_bpf_dispatch()which can be called
+ * One user of this function isscx_bpf_dsq_insert()which can be called
* recursively as sub-sched dispatches nest. Always inline to reduce stack usage
* from the call frame.
Quoted 5 lines
This one isn't a leftover of the
scx_bpf_dispatch()rename.scx_bpf_dsq_insert()doesn't callscx_dispatch_sched()and can't nest. The comment is a typo forscx_bpf_sub_dispatch(), which a parent'sops.dispatch()calls to trigger dispatching on a child scheduler, so the calls nest as sub-scheds do. Please usescx_bpf_sub_dispatch()instead.
Ah, I wrongly assumed it was a rename leftover, thanks for the explanation. scx_bpf_sub_dispatch() makes sense given the nesting. Will fix these up and send a v2 rebased on sched_ext/for-7.3.
Quoted 23 lines
kernel/sched/ext/internal.h struct sched_ext_ops { · line 488
Quoted 5 lines
* - sleeping (%SCX_DEQ_SLEEP)
* - being moved to another CPU
* - being temporarily taken off the queue for an attribute changekernel/sched/ext/internal.h +0
-1-* (%SCX_DEQ_SAVE)
SCX_DEQ_SAVEwas never defined, but these dequeues are flagged with %SCX_DEQ_SCHED_CHANGE whichops.quiescent()does receive. Please replace the reference instead of dropping it.kernel/sched/ext/internal.h struct sched_ext_ops { · line 969
Quoted 2 lines
kernel/sched/ext/internal.h +2
-0+* '_' and '.' chars. Exposed via +* /sys/kernel/sched_ext/root/ops while the BPF scheduler is enabled. @name applies to sub-schedulers too and they show it the same way under their own directories. Maybe something like "Exposed via the ops file in the scheduler's sysfs directory,
/sys/kernel/sched_ext/root/opsfor the root scheduler, while the BPF scheduler is enabled."The first hunk no longer applies to sched_ext/for-7.3. Please base v2 on that branch.
Thanks.