]> Gentwo Git Trees - linux/.git/commit
sched_ext: Add scx_cpu0 example scheduler
authorTejun Heo <tj@kernel.org>
Tue, 11 Nov 2025 19:18:13 +0000 (09:18 -1000)
committerTejun Heo <tj@kernel.org>
Wed, 12 Nov 2025 16:43:44 +0000 (06:43 -1000)
commitc948d9f80c675aad91d1510afed207df421b68e5
tree3770d50392253d600e20737448a0c5cb296e0e9c
parent582f700e1bdc5978f41e3d8d65d3e16e34e9be8a
sched_ext: Add scx_cpu0 example scheduler

Add scx_cpu0, a simple scheduler that queues all tasks to a single DSQ and
only dispatches them from CPU0 in FIFO order. This is useful for testing bypass
behavior when many tasks are concentrated on a single CPU. If the load balancer
doesn't work, bypass mode can trigger task hangs or RCU stalls as the queue is
long and there's only one CPU working on it.

v2: Check whether task is on CPU0 at enqueue using scx_bpf_task_cpu() instead
    of nr_cpus_allowed (Andrea Righi).

Cc: Dan Schatzberg <schatzberg.dan@gmail.com>
Cc: Emil Tsalapatis <etsal@meta.com>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/sched_ext/Makefile
tools/sched_ext/scx_cpu0.bpf.c [new file with mode: 0644]
tools/sched_ext/scx_cpu0.c [new file with mode: 0644]