sched,idle,rcu: Push rcu_idle deeper into the idle path
authorPeter Zijlstra <peterz@infradead.org>
Fri, 7 Aug 2020 18:50:19 +0000 (20:50 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 26 Aug 2020 10:41:53 +0000 (12:41 +0200)
commit1098582a0f6c4e8fd28da0a6305f9233d02c9c1d
treebda70ef4f575f5c5e3d8e957cd5d88125dbddf9e
parent49d9c5936314e44d314c605c39cce0fd947f9c3a
sched,idle,rcu: Push rcu_idle deeper into the idle path

Lots of things take locks, due to a wee bug, rcu_lockdep didn't notice
that the locking tracepoints were using RCU.

Push rcu_idle_{enter,exit}() as deep as possible into the idle paths,
this also resolves a lot of _rcuidle()/RCU_NONIDLE() usage.

Specifically, sched_clock_idle_wakeup_event() will use ktime which
will use seqlocks which will tickle lockdep, and
stop_critical_timings() uses lock.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Marco Elver <elver@google.com>
Link: https://lkml.kernel.org/r/20200821085348.310943801@infradead.org
drivers/cpuidle/cpuidle.c
kernel/sched/idle.c