]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sched_ext: Use rhashtable_lookup() instead of rhashtable_lookup_fast()
authorTejun Heo <tj@kernel.org>
Mon, 22 Sep 2025 01:32:40 +0000 (15:32 -1000)
committerTejun Heo <tj@kernel.org>
Wed, 22 Oct 2025 21:55:06 +0000 (11:55 -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.

Requires: bee8a520eb84 ("rhashtable: Use rcu_dereference_all and rcu_dereference_all_check")
Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c

index 04079ae4246e37eccf3d8bdd3bfded459bbe12b1..bde49e47f1e4bd5160f2b6859a4954f5b11082b2 100644 (file)
@@ -200,7 +200,7 @@ static struct scx_dispatch_q *find_global_dsq(struct scx_sched *sch,
 
 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);
 }
 
 /*