E.8.1 State Variables for Simplified Dynticks Interface

Figure: Variables for Simple Dynticks Interface
\begin{figure}{ \scriptsize
\begin{verbatim}1 struct rcu_dynticks {
2 int dy...
...ks_snap;
10 int dynticks_nmi_snap;
11 ...
12 };\end{verbatim}
}\end{figure}

Figure [*] shows the new per-CPU state variables. These variables are grouped into structs to allow multiple independent RCU implementations (e.g., rcu and rcu_bh) to conveniently and efficiently share dynticks state. In what follows, they can be thought of as independent per-CPU variables.

The dynticks_nesting, dynticks, and dynticks_snap variables are for the irq code paths, and the dynticks_nmi and dynticks_nmi_snap variables are for the NMI code paths, although the NMI code path will also reference (but not modify) the dynticks_nesting variable. These variables are used as follows:

If both dynticks and dynticks_nmi have taken on an even value during a given time interval, then the corresponding CPU has passed through a quiescent state during that interval.

Quick Quiz E.19: But what happens if an NMI handler starts running before an irq handler completes, and if that NMI handler continues running until a second irq handler starts? End Quick Quiz

Paul E. McKenney 2011-12-16