]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched_ext: Relocate cpu_acquire/cpu_release to end of struct sched_ext_ops
authorTejun Heo <tj@kernel.org>
Wed, 29 Apr 2026 18:09:10 +0000 (08:09 -1000)
committerTejun Heo <tj@kernel.org>
Wed, 29 Apr 2026 18:25:07 +0000 (08:25 -1000)
commit1e315c44aa91b4475e445d007151c13429ce7bce
treed7c36d7271b76e21100717efb0ca730303ea9456
parent017ec7d5fe178acbd3c9488843b800d3a32be295
sched_ext: Relocate cpu_acquire/cpu_release to end of struct sched_ext_ops

cpu_acquire and cpu_release are deprecated and slated for removal. Move
their declarations to the end of struct sched_ext_ops so an upcoming
cid-form struct (sched_ext_ops_cid) can omit them entirely without
disturbing the offsets of the shared fields.

Switch the two SCX_HAS_OP() callers for these ops to direct field checks
since the relocated ops sit outside the SCX_OPI_END range covered by the
has_op bitmap.

scx_kf_allow_flags[] auto-sizes to the highest used SCX_OP_IDX, so
SCX_OP_IDX(cpu_release) moving to a higher index just enlarges the
sparse array; the lookup logic is unchanged.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Reviewed-by: Changwoo Min <changwoo@igalia.com>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
kernel/sched/ext.c
kernel/sched/ext_internal.h