Skip to content

Commit feacb17

Browse files
committed
Merge tag 'sched_ext-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext
Pull sched_ext updates from Tejun Heo: - More in-kernel idle CPU selection improvements. Expand topology awareness coverage add scx_bpf_select_cpu_and() to allow more flexibility. The idle CPU selection kfuncs can now be called from unlocked contexts too. - A bunch of reorganization changes to lay the foundation for multiple hierarchical scheduler support. This isn't ready yet and the included changes don't make meaningful behavior differences. One notable change is replacing some static_key tests with dynamic tests as the test results may differ depending on the scheduler instance. This isn't expected to cause meaningful performance difference. - Other minor and doc updates. - There were multiple patches in for-6.15-fixes which conflicted with changes in for-6.16. for-6.15-fixes were pulled three times into for-6.16 to resolve the conflicts. * tag 'sched_ext-for-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: (49 commits) sched_ext: Call ops.update_idle() after updating builtin idle bits sched_ext, docs: convert mentions of "CFS" to "fair-class scheduler" selftests/sched_ext: Update test enq_select_cpu_fails sched_ext: idle: Consolidate default idle CPU selection kfuncs selftests/sched_ext: Add test for scx_bpf_select_cpu_and() via test_run sched_ext: idle: Allow scx_bpf_select_cpu_and() from unlocked context sched_ext: idle: Validate locking correctness in scx_bpf_select_cpu_and() sched_ext: Make scx_kf_allowed_if_unlocked() available outside ext.c sched_ext, docs: add label sched_ext: Explain the temporary situation around scx_root dereferences sched_ext: Add @sch to SCX_CALL_OP*() sched_ext: Cleanup [__]scx_exit/error*() sched_ext: Add @sch to SCX_CALL_OP*() sched_ext: Clean up scx_root usages Documentation: scheduler: Changed lowercase acronyms to uppercase sched_ext: Avoid NULL scx_root deref in __scx_exit() sched_ext: Add RCU protection to scx_root in DSQ iterator sched_ext: Clean up SCX_EXIT_NONE handling in scx_disable_workfn() sched_ext: Move disable machinery into scx_sched sched_ext: Move event_stats_cpu into scx_sched ...
2 parents 3b66e6b + 273cc94 commit feacb17

17 files changed

Lines changed: 1668 additions & 995 deletions

File tree

Documentation/scheduler/sched-ext.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _sched-ext:
2+
13
==========================
24
Extensible Scheduler Class
35
==========================
@@ -47,8 +49,8 @@ options should be enabled to use sched_ext:
4749
sched_ext is used only when the BPF scheduler is loaded and running.
4850

4951
If a task explicitly sets its scheduling policy to ``SCHED_EXT``, it will be
50-
treated as ``SCHED_NORMAL`` and scheduled by CFS until the BPF scheduler is
51-
loaded.
52+
treated as ``SCHED_NORMAL`` and scheduled by the fair-class scheduler until the
53+
BPF scheduler is loaded.
5254

5355
When the BPF scheduler is loaded and ``SCX_OPS_SWITCH_PARTIAL`` is not set
5456
in ``ops->flags``, all ``SCHED_NORMAL``, ``SCHED_BATCH``, ``SCHED_IDLE``, and
@@ -57,11 +59,11 @@ in ``ops->flags``, all ``SCHED_NORMAL``, ``SCHED_BATCH``, ``SCHED_IDLE``, and
5759
However, when the BPF scheduler is loaded and ``SCX_OPS_SWITCH_PARTIAL`` is
5860
set in ``ops->flags``, only tasks with the ``SCHED_EXT`` policy are scheduled
5961
by sched_ext, while tasks with ``SCHED_NORMAL``, ``SCHED_BATCH`` and
60-
``SCHED_IDLE`` policies are scheduled by CFS.
62+
``SCHED_IDLE`` policies are scheduled by the fair-class scheduler.
6163

6264
Terminating the sched_ext scheduler program, triggering `SysRq-S`, or
6365
detection of any internal error including stalled runnable tasks aborts the
64-
BPF scheduler and reverts all tasks back to CFS.
66+
BPF scheduler and reverts all tasks back to the fair-class scheduler.
6567

6668
.. code-block:: none
6769
@@ -197,8 +199,8 @@ Dispatch Queues
197199
To match the impedance between the scheduler core and the BPF scheduler,
198200
sched_ext uses DSQs (dispatch queues) which can operate as both a FIFO and a
199201
priority queue. By default, there is one global FIFO (``SCX_DSQ_GLOBAL``),
200-
and one local dsq per CPU (``SCX_DSQ_LOCAL``). The BPF scheduler can manage
201-
an arbitrary number of dsq's using ``scx_bpf_create_dsq()`` and
202+
and one local DSQ per CPU (``SCX_DSQ_LOCAL``). The BPF scheduler can manage
203+
an arbitrary number of DSQs using ``scx_bpf_create_dsq()`` and
202204
``scx_bpf_destroy_dsq()``.
203205

204206
A CPU always executes a task from its local DSQ. A task is "inserted" into a

0 commit comments

Comments
 (0)