Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sched/core: Check for rcu_read_lock_any_held() in idle_get_state()

Similar to commit 71fedc41c23b ("sched/fair: Switch to
rcu_dereference_all()"), switch to checking for rcu_read_lock_any_held()
in idle_get_state() to allow removing superfluous rcu_read_lock()
regions in the fair task's wakeup path where the pi_lock is held and
IRQs are disabled.

Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Tested-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://patch.msgid.link/20260312044434.1974-7-kprateek.nayak@amd.com

authored by

K Prateek Nayak and committed by
Peter Zijlstra
f494bfb0 10febd39

+1 -1
+1 -1
kernel/sched/sched.h
··· 2853 2853 2854 2854 static inline struct cpuidle_state *idle_get_state(struct rq *rq) 2855 2855 { 2856 - WARN_ON_ONCE(!rcu_read_lock_held()); 2856 + lockdep_assert(rcu_read_lock_any_held()); 2857 2857 2858 2858 return rq->idle_state; 2859 2859 }