]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched_ext: Make scx_has_op a bitmap
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)
commit0b304617936094b1e55c0b3e5903ce7d4f1bc32b
tree65c946ee7db1e5b0eb718565acb0d2d205c64e23
parent743354e3bb7238552cda70a5f39ba6e946a899fd
sched_ext: Make scx_has_op a bitmap

scx_has_op is used to encode which ops are implemented by the BPF scheduler
into an array of static_keys. While this saves a bit of branching overhead,
that is unlikely to be noticeable compared to the overall cost. As the
global static_keys can't work with the planned hierarchical multiple
scheduler support, replace the static_key array with a bitmap.

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