Skip to content

Commit 2a0596d

Browse files
EricccTaiwanhtejun
authored andcommitted
sched_ext: Documentation: Update sched-ext.rst
- Remove CONFIG_PAHOLE_HAS_BTF_TAG from required config list - Document ext_idle.c as the built-in idle CPU selection policy - Add descriptions for example schedulers in tools/sched_ext/ Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent 1dde502 commit 2a0596d

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

Documentation/scheduler/sched-ext.rst

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ options should be enabled to use sched_ext:
4343
CONFIG_DEBUG_INFO_BTF=y
4444
CONFIG_BPF_JIT_ALWAYS_ON=y
4545
CONFIG_BPF_JIT_DEFAULT_ON=y
46-
CONFIG_PAHOLE_HAS_BTF_TAG=y
4746
4847
sched_ext is used only when the BPF scheduler is loaded and running.
4948

@@ -346,6 +345,8 @@ Where to Look
346345
The functions prefixed with ``scx_bpf_`` can be called from the BPF
347346
scheduler.
348347

348+
* ``kernel/sched/ext_idle.c`` contains the built-in idle CPU selection policy.
349+
349350
* ``tools/sched_ext/`` hosts example BPF scheduler implementations.
350351

351352
* ``scx_simple[.bpf].c``: Minimal global FIFO scheduler example using a
@@ -354,13 +355,35 @@ Where to Look
354355
* ``scx_qmap[.bpf].c``: A multi-level FIFO scheduler supporting five
355356
levels of priority implemented with ``BPF_MAP_TYPE_QUEUE``.
356357

358+
* ``scx_central[.bpf].c``: A central FIFO scheduler where all scheduling
359+
decisions are made on one CPU, demonstrating ``LOCAL_ON`` dispatching,
360+
tickless operation, and kthread preemption.
361+
362+
* ``scx_cpu0[.bpf].c``: A scheduler that queues all tasks to a shared DSQ
363+
and only dispatches them on CPU0 in FIFO order. Useful for testing bypass
364+
behavior.
365+
366+
* ``scx_flatcg[.bpf].c``: A flattened cgroup hierarchy scheduler
367+
implementing hierarchical weight-based cgroup CPU control by compounding
368+
each cgroup's share at every level into a single flat scheduling layer.
369+
370+
* ``scx_pair[.bpf].c``: A core-scheduling example that always makes
371+
sibling CPU pairs execute tasks from the same CPU cgroup.
372+
373+
* ``scx_sdt[.bpf].c``: A variation of ``scx_simple`` demonstrating BPF
374+
arena memory management for per-task data.
375+
376+
* ``scx_userland[.bpf].c``: A minimal scheduler demonstrating user space
377+
scheduling. Tasks with CPU affinity are direct-dispatched in FIFO order;
378+
all others are scheduled in user space by a simple vruntime scheduler.
379+
357380
ABI Instability
358381
===============
359382

360383
The APIs provided by sched_ext to BPF schedulers programs have no stability
361384
guarantees. This includes the ops table callbacks and constants defined in
362385
``include/linux/sched/ext.h``, as well as the ``scx_bpf_`` kfuncs defined in
363-
``kernel/sched/ext.c``.
386+
``kernel/sched/ext.c`` and ``kernel/sched/ext_idle.c``.
364387

365388
While we will attempt to provide a relatively stable API surface when
366389
possible, they are subject to change without warning between kernel

0 commit comments

Comments
 (0)