[PATCH] docs: sched_ext: Document the isolcpus= domain isolation restriction

From: Shaojie Sun

Date: Thu Dec 03 2026 - 03:04:49 EST


sched_ext refuses to load when the machine was booted with isolcpus= using
the domain flag, which is the default when no flag is given. This has been
the behavior since commit 9f391f94a173 ("sched_ext: Disallow loading BPF
scheduler if isolcpus= domain isolation is in effect"), but none of the
documentation mentions it -- neither the sched_ext overview nor the CPU
isolation guide where isolcpus= is described. Attaching a BPF scheduler on
such a machine only fails with -EINVAL from the bpf link creation and a
single line in dmesg, so users have to reconstruct the reason from the
housekeeping, cpuset and sched_ext sources.

isolcpus= domain isolation only removes CPUs from the sched domains
without restricting affinity masks, which a BPF scheduler cannot honor.

Document the restriction and the supported alternative -- cpuset isolated
partitions -- in the sched_ext overview, and cross-reference it from the
scheduler domain isolation section of the CPU isolation guide, which is
where users configuring isolcpus= land.

Signed-off-by: Shaojie Sun <sunshaojie@xxxxxxxxxx>
---
Documentation/admin-guide/cpu-isolation.rst | 6 ++++++
Documentation/scheduler/sched-ext.rst | 19 +++++++++++++++++++
2 files changed, 25 insertions(+)

diff --git a/Documentation/admin-guide/cpu-isolation.rst b/Documentation/admin-guide/cpu-isolation.rst
index 8c65d03fd28c..f18360f6f014 100644
--- a/Documentation/admin-guide/cpu-isolation.rst
+++ b/Documentation/admin-guide/cpu-isolation.rst
@@ -116,6 +116,12 @@ Interfaces
less flexible alternative that doesn't allow for runtime
reconfiguration.

+Note that boot-time domain isolation is not compatible with sched_ext: the
+BPF scheduler load fails with -EINVAL because the isolation is applied to
+the sched domains only, leaving the affected tasks with their full CPU
+affinity mask. Use cpuset isolated partitions if a sched_ext scheduler has
+to be loaded. See Documentation/scheduler/sched-ext.rst.
+
IRQs isolation
--------------

diff --git a/Documentation/scheduler/sched-ext.rst b/Documentation/scheduler/sched-ext.rst
index 0e97fd019994..6814574efa90 100644
--- a/Documentation/scheduler/sched-ext.rst
+++ b/Documentation/scheduler/sched-ext.rst
@@ -60,6 +60,25 @@ by sched_ext, while tasks with ``SCHED_NORMAL``, ``SCHED_BATCH`` and
``SCHED_IDLE`` policies are scheduled by the fair-class scheduler which has
higher sched_class precedence than ``SCHED_EXT``.

+Boot-time CPU isolation using ``isolcpus=`` with the ``domain`` flag, which
+is the default when no flag is given, is not supported: loading a BPF
+scheduler fails with ``-EINVAL``:
+
+.. code-block:: none
+
+ sched_ext: Not compatible with "isolcpus=" domain isolation
+
+``isolcpus=`` domain isolation removes the isolated CPUs from the top-level
+sched domains without restricting the affected tasks' CPU affinity masks.
+As sched_ext honors task affinity and nothing else constrains where those
+tasks may be placed, it cannot keep them on the isolated CPUs and would
+silently break the isolation, so the kernel refuses to load instead.
+
+Use cpuset isolated partitions (``cpuset.cpus.partition``) instead; they are
+reflected in each member task's CPU affinity mask and thus enforced by
+sched_ext. Boot-time domain isolation is reported in
+``/sys/devices/system/cpu/isolated``.
+
Terminating the sched_ext scheduler program, triggering `SysRq-S`, or
detection of any internal error including stalled runnable tasks aborts the
BPF scheduler and reverts all tasks back to the fair-class scheduler.
--
2.50.1