D.3.1.1 Tracking Dyntick State
The per-CPU rcu_dynticks structure tracks dynticks state using the
following fields:
- dynticks_nesting:
This int counts the number of reasons that the corresponding
CPU should be monitored for RCU read-side critical sections.
If the CPU is in dynticks-idle mode, then this counts the
irq nesting level, otherwise it is one greater than the
irq nesting level.
- dynticks:
This int counter's value is even if the corresponding CPU is
in dynticks-idle mode and there are no irq handlers currently
running on that CPU, otherwise the counter's value is odd.
In other words, if this counter's value is odd, then the
corresponding CPU might be in an RCU read-side critical section.
- dynticks_nmi:
This int counter's value is odd if the corresponding CPU is
in an NMI handler, but only if the NMI arrived while this
CPU was in dyntick-idle mode with no irq handlers running.
Otherwise, the counter's value will be even.
This state is shared between the rcu and rcu_bh implementations.
Paul E. McKenney
2011-12-16