[PATCHSET sched_ext/for-7.5] sched_ext: Start ext_server from the tick

From: Tejun Heo

Date: Wed Nov 25 2026 - 05:34:40 EST


Hello,

ext_server starts when the first task is enqueued on a CPU's rq and stops
when its pick finds no task. As the BPF scheduler can run a task on any CPU
whichever rq it is queued on, tasks can wait for a CPU whose ext_server has
stopped with no enqueue to start it again, and a higher class task which
keeps the CPU starves them until the watchdog fires. scx_central with a
SCHED_FIFO task spinning on a CPU shows it.

Peter pointed out the problem when ext_server was being added [1]. Hang's
recent patch which starts ext_server on every enqueue [2] helps but leaves
cases like the above.

This patchset also starts ext_server from the tick, while a higher class
task is running on the CPU:

- If the local DSQ has a task, right away. This covers a task which another
CPU inserts after the pick came up empty.

- Otherwise, if any task is runnable on SCX, at most once a server period.
Only ops.dispatch() can tell whether the BPF scheduler has a task for the
CPU, and the server's pick calls it.

Whether any task is runnable comes from per-node counts of rqs which have
tasks, which a per-node timer lowers lazily, and a global count of such
nodes, which is all the tick reads.

This is a departure from how dl servers are usually driven and there may be
better ways to go about it, but it does seem to solve the problem properly
without adding much overhead.

With the patchset, a SCHED_EXT task sharing a CPU with a SCHED_FIFO hog gets
the server's share under both scx_simple and scx_central. The second patch
does the same from the remote tick for nohz_full CPUs.

Based on sched_ext/for-7.5 (cb31a095aab1).

This patchset contains the following 2 patches.

0001 sched_ext: Start ext_server from the tick while a higher class holds the CPU
0002 sched_ext: Start ext_server from the remote tick on nohz_full CPUs

The patchset is also available in the following git branch:

git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git ext-server-tick

diffstat follows. Thanks.

kernel/sched/core.c | 5 +-
kernel/sched/ext/ext.c | 174 ++++++++++++++++++++++++++++++++++++++++++++++-
kernel/sched/ext/ext.h | 4 ++
kernel/sched/ext/types.h | 1 +
kernel/sched/sched.h | 2 +
5 files changed, 182 insertions(+), 4 deletions(-)

[1] https://lore.kernel.org/r/20260202195035.GG1282955@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[2] https://lore.kernel.org/r/20261123-scx-dlsrv-v1-2-87c342d8246e@xxxxxxxxx

--
tejun