]> www.infradead.org Git - users/dwmw2/linux.git/commit
sched_ext: Remove scx_ops_cpu_preempt static_key
authorTejun Heo <tj@kernel.org>
Wed, 9 Apr 2025 19:06:00 +0000 (09:06 -1000)
committerTejun Heo <tj@kernel.org>
Wed, 9 Apr 2025 19:06:00 +0000 (09:06 -1000)
commit54d2e717bc5f419b111915adfdec7ecc1ca8cf90
tree2c1e6038ee7f8d7b906c94330634156db3128f15
parentcc39454c341e02b929e565f8a37cfe9b18c7a0a9
sched_ext: Remove scx_ops_cpu_preempt static_key

scx_ops_cpu_preempt is used to encode whether ops.cpu_acquire/release() are
implemented into a static_key. These tests aren't hot enough for static_key
usage to make any meaningful difference and are made to use a static_key
mostly because there was no reason not to. However, global static_keys can't
work with the planned hierarchical multiple scheduler support. Remove the
static_key and instead use an internal ops flag SCX_OPS_HAS_CPU_PREEMPT to
record and test whether ops.cpu_acquire/release() are implemented.

In repeated hackbench runs before and after static_keys removal on an AMD
Ryzen 3900X, I couldn't tell any measurable performance difference.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Changwoo Min <changwoo@igalia.com>
Acked-by: Andrea Righi <arighi@nvidia.com>
kernel/sched/ext.c