]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sched_ext: Use rhashtable_lookup() instead of rhashtable_lookup_fast()
authorTejun Heo <tj@kernel.org>
Tue, 23 Sep 2025 19:03:25 +0000 (09:03 -1000)
committerTejun Heo <tj@kernel.org>
Tue, 23 Sep 2025 19:03:25 +0000 (09:03 -1000)
The find_user_dsq() function is called from contexts that are already
under RCU read lock protection. Switch from rhashtable_lookup_fast() to
rhashtable_lookup() to avoid redundant RCU locking.

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

index f7e17dc0422e2625ddad894ef235b5d66e2a3b09..0f17b715461f18ee0e40277f6248ffb205b33ddc 100644 (file)
@@ -207,7 +207,7 @@ static struct scx_dispatch_q *find_global_dsq(struct task_struct *p)
 
 static struct scx_dispatch_q *find_user_dsq(struct scx_sched *sch, u64 dsq_id)
 {
-       return rhashtable_lookup_fast(&sch->dsq_hash, &dsq_id, dsq_hash_params);
+       return rhashtable_lookup(&sch->dsq_hash, &dsq_id, dsq_hash_params);
 }
 
 /*