linux/kernel/rcu
Paul E. McKenney f39b536ce9 rcu: Remove extraneous READ_ONCE()s from rcu_irq_{enter,exit}()
The read of ->dynticks_nmi_nesting in rcu_irq_enter() and rcu_irq_exit()
is currently protected with READ_ONCE().  However, this protection is
unnecessary because (1) ->dynticks_nmi_nesting is updated only by the
current CPU, (2) Although NMI handlers can update this field, they reset
it back to its old value before return, and (3) Interrupts are disabled,
so nothing else can modify it.  The value of ->dynticks_nmi_nesting is
thus effectively constant, and so no protection is required.

This commit therefore removes the READ_ONCE() protection from these
two accesses.

Link: http://lkml.kernel.org/r/20170926031902.GA2074@linux.vnet.ibm.com

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2017-10-03 10:27:32 -04:00
..
Kconfig rcu: Remove RCU CPU stall warnings from Tiny RCU 2017-06-08 18:52:45 -07:00
Kconfig.debug rcu: Move RCU debug Kconfig options to kernel/rcu 2017-06-08 18:52:44 -07:00
Makefile rcu: Remove debugfs tracing 2017-06-08 18:52:43 -07:00
rcu.h rcu: Eliminate NOCBs CPU-state Kconfig options 2017-06-08 18:52:43 -07:00
rcu_segcblist.c rcu: Separately compile large rcu_segcblist functions 2017-05-02 07:21:02 -07:00
rcu_segcblist.h rcu: Open-code the rcu_cblist_n_lazy_cbs() function 2017-05-02 09:22:48 -07:00
rcuperf.c rcu: Move expediting-related access/control out of rcupdate.h 2017-06-08 18:52:28 -07:00
rcutorture.c srcu: Remove Classic SRCU 2017-06-08 18:52:42 -07:00
srcutiny.c srcu: Apply trivial callback lists to shrink Tiny SRCU 2017-06-08 18:52:35 -07:00
srcutree.c srcu: Use rnp->lock wrappers to replace explicit memory barriers 2017-06-08 18:52:38 -07:00
sync.c locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write() 2016-08-18 15:36:59 +02:00
tiny.c rcu: Remove RCU CPU stall warnings from Tiny RCU 2017-06-08 18:52:45 -07:00
tiny_plugin.h rcu: Remove RCU CPU stall warnings from Tiny RCU 2017-06-08 18:52:45 -07:00
tree.c rcu: Remove extraneous READ_ONCE()s from rcu_irq_{enter,exit}() 2017-10-03 10:27:32 -04:00
tree.h rcu: Remove debugfs tracing 2017-06-08 18:52:43 -07:00
tree_exp.h rcu: Make sync_rcu_preempt_exp_done() return bool 2017-06-08 08:25:27 -07:00
tree_plugin.h rcu: Eliminate NOCBs CPU-state Kconfig options 2017-06-08 18:52:43 -07:00
update.c rcu: Move rcu_expedited and rcu_normal externs from rcupdate.h 2017-06-08 18:52:27 -07:00