summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2025-09-23 09:03:26 -1000
committerTejun Heo <tj@kernel.org>2025-09-23 09:03:26 -1000
commit956f2b11a8a4fd2793aaa8a672c70206f0ce4655 (patch)
tree5bb23882fa08d800c4e5d405cddd0f00c480241e /rust/helpers/helpers.c
parent2407bae23d1e93186afccb6a6a98d9bd6a7c8a74 (diff)
sched_ext: Drop kf_cpu_valid()
The intention behind kf_cpu_valid() was that when called from kfuncs, kf_cpu_valid() would be able to implicitly determine the scx_sched instance being operated on and thus wouldn't need @sch passed in explicitly. This turned out to be unnecessarily complicated to implement and not have justifiable practical benefits. Replace kf_cpu_valid() usages with ops_cpu_valid() which takes explicit @sch. Callers which don't have $sch available in the context are updated to read $scx_root under RCU read lock, verify that it's not NULL and pass it in. scx_bpf_cpu_rq() is restructured to use guard(rcu)() instead of explicit rcu_read_[un]lock(). Reviewed-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions