* [PATCH 0/2] sched_ext: documentation fixes
@ 2026-08-19 3:12 luoliang
2026-08-19 3:12 ` [PATCH 1/2] Docs/admin-guide/cgroup-v2: document BPF scheduler callbacks for cpu.max and cpu.idle luoliang
2026-08-19 3:12 ` [PATCH 2/2] sched_ext: Fix nonexistent field in sched-ext.rst example luoliang
0 siblings, 2 replies; 5+ messages in thread
From: luoliang @ 2026-08-19 3:12 UTC (permalink / raw)
To: Tejun Heo
Cc: David Vernet, Andrea Righi, Changwoo Min, sched-ext, linux-kernel,
Liang Luo
From: Liang Luo <luoliang@kylinos.cn>
Two documentation fixes found by cross-checking the documents against
the current kernel code:
1. cgroup-v2.rst: cpu.max, cpu.max.burst and cpu.idle still claim to
affect only the fair-class scheduler, but writes to these files
also notify BPF schedulers through the cgroup_set_bandwidth and
cgroup_set_idle callbacks. Mirror the existing cpu.weight wording.
2. sched-ext.rst: the ops.exit() example reads ei->type, a field
struct scx_exit_info has never had. Use ei->kind so the example
compiles as written.
Liang Luo (2):
Docs/admin-guide/cgroup-v2: document BPF scheduler callbacks for
cpu.max and cpu.idle
sched_ext: Fix nonexistent field in sched-ext.rst example
Documentation/admin-guide/cgroup-v2.rst | 12 +++++++++---
Documentation/scheduler/sched-ext.rst | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] Docs/admin-guide/cgroup-v2: document BPF scheduler callbacks for cpu.max and cpu.idle
2026-08-19 3:12 [PATCH 0/2] sched_ext: documentation fixes luoliang
@ 2026-08-19 3:12 ` luoliang
2026-08-19 20:08 ` Tejun Heo
2026-08-19 3:12 ` [PATCH 2/2] sched_ext: Fix nonexistent field in sched-ext.rst example luoliang
1 sibling, 1 reply; 5+ messages in thread
From: luoliang @ 2026-08-19 3:12 UTC (permalink / raw)
To: Tejun Heo
Cc: David Vernet, Andrea Righi, Changwoo Min, sched-ext, linux-kernel,
Liang Luo
From: Liang Luo <luoliang@kylinos.cn>
The cpu.weight and cpu.weight.nice entries already state that the files
also affect a BPF scheduler through the cgroup_set_weight callback.
However, cpu.max, cpu.max.burst and cpu.idle only mention the fair-class
scheduler, even though sched_ext implements the cgroup_set_bandwidth
(notified with the period/quota from cpu.max and the burst from
cpu.max.burst) and cgroup_set_idle callbacks from these interfaces.
Mirror the cpu.weight wording for the three entries so BPF scheduler
users can discover these notification points.
Signed-off-by: Liang Luo <luoliang@kylinos.cn>
---
Documentation/admin-guide/cgroup-v2.rst | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst
index aed195a71cbf..3f77f15d0543 100644
--- a/Documentation/admin-guide/cgroup-v2.rst
+++ b/Documentation/admin-guide/cgroup-v2.rst
@@ -1202,7 +1202,9 @@ will be referred to. All time durations are in microseconds.
$PERIOD duration. "max" for $MAX indicates no limit. If only
one number is written, $MAX is updated.
- This file affects only processes under the fair-class scheduler.
+ This file affects only processes under the fair-class scheduler and a BPF
+ scheduler with the ``cgroup_set_bandwidth`` callback depending on what
+ the callback actually does.
cpu.max.burst
A read-write single value file which exists on non-root
@@ -1210,7 +1212,9 @@ will be referred to. All time durations are in microseconds.
The burst in the range [0, $MAX].
- This file affects only processes under the fair-class scheduler.
+ This file affects only processes under the fair-class scheduler and a BPF
+ scheduler with the ``cgroup_set_bandwidth`` callback depending on what
+ the callback actually does.
cpu.pressure
A read-write nested-keyed file.
@@ -1262,7 +1266,9 @@ will be referred to. All time durations are in microseconds.
own relative priorities, but the cgroup itself will be treated as
very low priority relative to its peers.
- This file affects only processes under the fair-class scheduler.
+ This file affects only processes under the fair-class scheduler and a BPF
+ scheduler with the ``cgroup_set_idle`` callback depending on what the
+ callback actually does.
Memory
------
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] sched_ext: Fix nonexistent field in sched-ext.rst example
2026-08-19 3:12 [PATCH 0/2] sched_ext: documentation fixes luoliang
2026-08-19 3:12 ` [PATCH 1/2] Docs/admin-guide/cgroup-v2: document BPF scheduler callbacks for cpu.max and cpu.idle luoliang
@ 2026-08-19 3:12 ` luoliang
2026-08-19 20:08 ` Tejun Heo
1 sibling, 1 reply; 5+ messages in thread
From: luoliang @ 2026-08-19 3:12 UTC (permalink / raw)
To: Tejun Heo
Cc: David Vernet, Andrea Righi, Changwoo Min, sched-ext, linux-kernel,
Liang Luo
From: Liang Luo <luoliang@kylinos.cn>
The ops.exit() example in sched-ext.rst reads ei->type, but
struct scx_exit_info has never had a type field - the exit reason is
exposed as ei->kind since the struct was introduced. A scheduler
written following the example fails to compile with
error: no member named 'type' in 'struct scx_exit_info'
Use ei->kind.
Fixes: fa48e8d2c7b5 ("sched_ext: Documentation: scheduler: Document extensible scheduler class")
Signed-off-by: Liang Luo <luoliang@kylinos.cn>
---
Documentation/scheduler/sched-ext.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/scheduler/sched-ext.rst b/Documentation/scheduler/sched-ext.rst
index 2771ea4cc14a..96ff66c91ceb 100644
--- a/Documentation/scheduler/sched-ext.rst
+++ b/Documentation/scheduler/sched-ext.rst
@@ -229,7 +229,7 @@ optional. The following modified excerpt is from
void BPF_STRUCT_OPS(simple_exit, struct scx_exit_info *ei)
{
- exit_type = ei->type;
+ exit_type = ei->kind;
}
SEC(".struct_ops")
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Docs/admin-guide/cgroup-v2: document BPF scheduler callbacks for cpu.max and cpu.idle
2026-08-19 3:12 ` [PATCH 1/2] Docs/admin-guide/cgroup-v2: document BPF scheduler callbacks for cpu.max and cpu.idle luoliang
@ 2026-08-19 20:08 ` Tejun Heo
0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2026-08-19 20:08 UTC (permalink / raw)
To: luoliang
Cc: David Vernet, Andrea Righi, Changwoo Min, Emil Tsalapatis,
sched-ext, linux-kernel
Hello,
On Wed, Aug 19, 2026 at 11:12:43AM +0800, luoliang@kylinos.cn wrote:
> - This file affects only processes under the fair-class scheduler.
> + This file affects only processes under the fair-class scheduler and a BPF
> + scheduler with the ``cgroup_set_bandwidth`` callback depending on what
> + the callback actually does.
The "CPU Interface Files" preamble defines the categories that the
interface file entries refer back to and it only knows about
cgroup_set_weight:
* Processes under the fair-class scheduler
* Processes under a BPF scheduler with the ``cgroup_set_weight`` callback
* Everything else: ``SCHED_{FIFO,RR,DEADLINE}`` and processes under a BPF
scheduler without the ``cgroup_set_weight`` callback
With cpu.max, cpu.max.burst and cpu.idle now referring to
cgroup_set_bandwidth and cgroup_set_idle, the preamble no longer covers
the entries that follow it. Can you please update the preamble to match,
e.g. by making the bullets refer to the corresponding cgroup_set_*
callback, and resend?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] sched_ext: Fix nonexistent field in sched-ext.rst example
2026-08-19 3:12 ` [PATCH 2/2] sched_ext: Fix nonexistent field in sched-ext.rst example luoliang
@ 2026-08-19 20:08 ` Tejun Heo
0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2026-08-19 20:08 UTC (permalink / raw)
To: luoliang
Cc: David Vernet, Andrea Righi, Changwoo Min, Emil Tsalapatis,
sched-ext, linux-kernel
Applied to sched_ext/for-7.3-fixes.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-19 20:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19 3:12 [PATCH 0/2] sched_ext: documentation fixes luoliang
2026-08-19 3:12 ` [PATCH 1/2] Docs/admin-guide/cgroup-v2: document BPF scheduler callbacks for cpu.max and cpu.idle luoliang
2026-08-19 20:08 ` Tejun Heo
2026-08-19 3:12 ` [PATCH 2/2] sched_ext: Fix nonexistent field in sched-ext.rst example luoliang
2026-08-19 20:08 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox