]> Gentwo Git Trees - linux/.git/commit
sched_ext: Wrap kfunc args in struct to prepare for aux__prog
authorTejun Heo <tj@kernel.org>
Tue, 7 Oct 2025 01:51:46 +0000 (15:51 -1000)
committerTejun Heo <tj@kernel.org>
Mon, 13 Oct 2025 18:49:29 +0000 (08:49 -1000)
commitc0d630ba347c7671210e1bab3c79defea19844e9
treee1c114ff22c10fe01defd654fe6b4cecf2a49d4d
parent3035addfaf285f32d1f513d181ebcb85924ae3c3
sched_ext: Wrap kfunc args in struct to prepare for aux__prog

scx_bpf_dsq_insert_vtime() and scx_bpf_select_cpu_and() currently have 5
parameters. An upcoming change will add aux__prog parameter which will exceed
BPF's 5 argument limit.

Prepare by adding new kfuncs __scx_bpf_dsq_insert_vtime() and
__scx_bpf_select_cpu_and() that take args structs. The existing kfuncs are
kept as compatibility wrappers. BPF programs use inline wrappers that detect
kernel API version via bpf_core_type_exists() and use the new struct-based
kfuncs when available, falling back to compat kfuncs otherwise. This allows
BPF programs to work with both old and new kernels.

Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c
kernel/sched/ext_idle.c
tools/sched_ext/include/scx/common.bpf.h
tools/sched_ext/include/scx/compat.bpf.h