rcu: Move RCU_FAST_NO_HZ per-CPU variables to rcu_dynticks structure
The RCU_FAST_NO_HZ code relies on a number of per-CPU variables. This works, but is hidden from someone scanning the data structures in rcutree.h. This commit therefore converts these per-CPU variables to fields in the per-CPU rcu_dynticks structures. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com> Tested-by: Pascal Chapperon <pascal.chapperon@wanadoo.fr>
This commit is contained in:
parent
fd4b352687
commit
5955f7eecd
2 changed files with 58 additions and 55 deletions
|
@ -84,6 +84,20 @@ struct rcu_dynticks {
|
|||
/* Process level is worth LLONG_MAX/2. */
|
||||
int dynticks_nmi_nesting; /* Track NMI nesting level. */
|
||||
atomic_t dynticks; /* Even value for idle, else odd. */
|
||||
#ifdef CONFIG_RCU_FAST_NO_HZ
|
||||
int dyntick_drain; /* Prepare-for-idle state variable. */
|
||||
unsigned long dyntick_holdoff;
|
||||
/* No retries for the jiffy of failure. */
|
||||
struct timer_list idle_gp_timer;
|
||||
/* Wake up CPU sleeping with callbacks. */
|
||||
unsigned long idle_gp_timer_expires;
|
||||
/* When to wake up CPU (for repost). */
|
||||
bool idle_first_pass; /* First pass of attempt to go idle? */
|
||||
unsigned long nonlazy_posted;
|
||||
/* # times non-lazy CBs posted to CPU. */
|
||||
unsigned long nonlazy_posted_snap;
|
||||
/* idle-period nonlazy_posted snapshot. */
|
||||
#endif /* #ifdef CONFIG_RCU_FAST_NO_HZ */
|
||||
};
|
||||
|
||||
/* RCU's kthread states for tracing. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue