E.8.3 NMIs From Dynticks-Idle Mode
Keywords: perfbook_html

##
E.8.3 NMIs From Dynticks-Idle Mode

Figure: NMIs From Dynticks-Idle Mode

Figure show the rcu_nmi_enter() and rcu_nmi_exit() functions, which inform RCU of NMI entry and exit, respectively, from dynticks-idle mode. However, if the NMI arrives during an irq handler, then RCU will already be on the lookout for RCU read-side critical sections from this CPU, so lines 6 and 7 of rcu_nmi_enter and lines 19 and 20 of rcu_nmi_exit silently return if dynticks is odd. Otherwise, the two functions increment dynticks_nmi, with rcu_nmi_enter() leaving it with an odd value and rcu_nmi_exit() leaving it with an even value. Both functions execute memory barriers between this increment and possible RCU read-side critical sections on lines 11 and 21, respectively.