]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched_ext: Add enq_flags to scx_bpf_dsq_move_to_local()
authorTejun Heo <tj@kernel.org>
Fri, 13 Mar 2026 19:43:23 +0000 (09:43 -1000)
committerTejun Heo <tj@kernel.org>
Fri, 13 Mar 2026 19:43:23 +0000 (09:43 -1000)
commit860683763ebf4662cb72a312279334e02718308f
tree2357f6ab960f4c2c3bae008b055feb2fdf2a87c6
parentda32a2986e5fb3c70562ad610918834696e87322
sched_ext: Add enq_flags to scx_bpf_dsq_move_to_local()

scx_bpf_dsq_move_to_local() moves a task from a non-local DSQ to the
current CPU's local DSQ. This is an indirect way of dispatching to a local
DSQ and should support enq_flags like direct dispatches do - e.g.
SCX_ENQ_HEAD for head-of-queue insertion and SCX_ENQ_IMMED for immediate
execution guarantees.

Add scx_bpf_dsq_move_to_local___v2() with an enq_flags parameter. The
original becomes a v1 compat wrapper passing 0. The compat macro is updated
to a three-level chain: v2 (7.1+) -> v1 (current) -> scx_bpf_consume
(pre-rename). All in-tree BPF schedulers are updated to pass 0.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
kernel/sched/ext.c
tools/sched_ext/include/scx/compat.bpf.h
tools/sched_ext/scx_central.bpf.c
tools/sched_ext/scx_cpu0.bpf.c
tools/sched_ext/scx_flatcg.bpf.c
tools/sched_ext/scx_qmap.bpf.c
tools/sched_ext/scx_sdt.bpf.c
tools/sched_ext/scx_simple.bpf.c