rcu: Apply noinstr to rcu_idle_enter() and rcu_idle_exit()
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 18 May 2022 04:00:04 +0000 (21:00 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 20 Jun 2022 16:30:10 +0000 (09:30 -0700)
commited4ae5eff4b38797607cbdd80da394149110fb37
treeedd53dec6e18c1436a45d2478793359c2def54cf
parent245a62982502255314b63dd2c4daaedd1cd595a6
rcu: Apply noinstr to rcu_idle_enter() and rcu_idle_exit()

This commit applies the "noinstr" tag to the rcu_idle_enter() and
rcu_idle_exit() functions, which are invoked from portions of the idle
loop that cannot be instrumented.  These tags require reworking the
rcu_eqs_enter() and rcu_eqs_exit() functions that these two functions
invoke in order to cause them to use normal assertions rather than
lockdep.  In addition, within rcu_idle_exit(), the raw versions of
local_irq_save() and local_irq_restore() are used, again to avoid issues
with lockdep in uninstrumented code.

This patch is based in part on an earlier patch by Jiri Olsa, discussions
with Peter Zijlstra and Frederic Weisbecker, earlier changes by Thomas
Gleixner, and off-list discussions with Yonghong Song.

Link: https://lore.kernel.org/lkml/20220515203653.4039075-1-jolsa@kernel.org/
Reported-by: Jiri Olsa <jolsa@kernel.org>
Reported-by: Alexei Starovoitov <ast@kernel.org>
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Yonghong Song <yhs@fb.com>
kernel/rcu/tree.c