Lines Matching +full:last +full:- +full:level
1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Read-Copy Update mechanism for mutual exclusion (tree-based version)
4 * Internal non-public definitions.
43 * Definition for node within the RCU grace-period-detection hierarchy.
49 unsigned long gp_seq; /* Track rsp->gp_seq. */
60 /* Per-GP initial value for qsmask. */
61 /* Initialized from ->qsmaskinitnext at the */
68 /* Per-GP initial values for expmask. */
69 /* Initialized from ->expmaskinitnext at the */
80 int grplo; /* lowest-numbered CPU here. */
81 int grphi; /* highest-numbered CPU here. */
82 u8 grpnum; /* group number for next level up. */
83 u8 level; /* root is at level 0. */ member
85 /* exit RCU read-side critical sections */
90 /* Tasks blocked in RCU read-side critical */
112 /* Used only for the priority-boosting */
145 * This generates the bit for a CPU in node-local masks.
147 #define leaf_node_cpu_bit(rnp, cpu) (BIT((cpu) - (rnp)->grplo))
161 /* Per-CPU data for read-copy update. */
163 /* 1) quiescent-state and grace-period handling : */
164 unsigned long gp_seq; /* Track rsp->gp_seq counter. */
169 bool gpwrap; /* Possible ->gp_seq wrap. */
173 unsigned long ticks_this_gp; /* The number of scheduling-clock */
175 /* during and after the last grace */
186 /* qlen at last check for QS forcing */
193 int dynticks_snap; /* Per-GP tracking for dynticks. */
202 int exp_dynticks_snap; /* Double-check need for IPI. */
213 unsigned long nocb_gp_adv_time; /* Last call_rcu() CB adv (jiffies). */
219 struct rcu_cblist nocb_bypass; /* Lock-contention-bypass CB list. */
221 unsigned long nocb_nobypass_last; /* Last ->cblist enqueue (jiffies). */
222 int nocb_nobypass_count; /* # ->cblist enqueues at ^^^ time. */
227 u8 nocb_gp_bypass; /* Found a bypass on last scan? */
228 u8 nocb_gp_gp; /* GP to wait for on last scan? */
229 unsigned long nocb_gp_seq; /* If so, ->gp_seq to wait for. */
239 struct rcu_data *nocb_toggling_rdp; /* rdp queued for (de-)offloading */
243 /* GP rdp takes GP-end wakeups. */
248 /* rcuc per-CPU kthread or NULL. */
255 /* ->rcu_iw* fields protected by leaf rcu_node ->lock. */
256 struct irq_work rcu_iw; /* Check for non-irq activity. */
257 bool rcu_iw_pending; /* Is ->rcu_iw pending? */
258 unsigned long rcu_iw_gp_seq; /* ->gp_seq associated with ->rcu_iw. */
259 unsigned long rcu_ofl_gp_seq; /* ->gp_seq at last offline. */
260 short rcu_ofl_gp_flags; /* ->gp_flags at last offline. */
261 unsigned long rcu_onl_gp_seq; /* ->gp_seq at last online. */
262 short rcu_onl_gp_flags; /* ->gp_flags at last online. */
263 unsigned long last_fqs_resched; /* Time of last rcu_resched(). */
264 unsigned long last_sched_clock; /* Jiffies of last rcu_sched_clock_irq(). */
281 /* quiescent-state forcing. */
300 * represented in "heap" form in a dense array. The root (first level)
301 * of the hierarchy is in ->node[0] (referenced by ->level[0]), the second
302 * level in ->node[1] through ->node[m] (->node[1] referenced by ->level[1]),
303 * and the third level in ->node[m+1] and following (->node[m+1] referenced
304 * by ->level[2]). The number of levels is determined by the number of
310 struct rcu_node *level[RCU_NUM_LVLS + 1]; member
319 /* Grace-period sequence #. */
326 unsigned long gp_wake_time; /* Last GP kthread wake. */
327 unsigned long gp_wake_seq; /* ->gp_seq at ^^^. */
329 unsigned long gp_seq_polled_snap; /* ->gp_seq_polled at normal GP start. */
330 unsigned long gp_seq_polled_exp_snap; /* ->gp_seq_polled at expedited GP start. */
341 raw_spinlock_t barrier_lock; /* Protects ->barrier_seq_snap. */
347 struct swait_queue_head expedited_wq; /* Wait for check-ins. */
348 int ncpus_snap; /* # CPUs seen last time. */
360 unsigned long gp_end; /* Time last GP ended, again */
362 unsigned long gp_activity; /* Time of last GP kthread */
364 unsigned long gp_req_activity; /* Time of last GP request */
377 /* GP pre-initialization. */
382 #define RCU_GP_FLAG_INIT 0x1 /* Need grace-period initialization. */
383 #define RCU_GP_FLAG_FQS 0x2 /* Need grace-period quiescent-state forcing. */
388 #define RCU_GP_WAIT_GPS 1 /* Wait for grace-period start. */
389 #define RCU_GP_DONE_GPS 2 /* Wait done for grace-period start. */
390 #define RCU_GP_ONOFF 3 /* Grace-period initialization hotplug. */
391 #define RCU_GP_INIT 4 /* Grace-period initialization. */
392 #define RCU_GP_WAIT_FQS 5 /* Wait for force-quiescent-state time. */
393 #define RCU_GP_DOING_FQS 6 /* Wait done for force-quiescent-state time. */
394 #define RCU_GP_CLEANUP 7 /* Grace-period cleanup started. */
395 #define RCU_GP_CLEANED 8 /* Grace-period cleanup complete. */
448 static int rcu_nocb_need_deferred_wakeup(struct rcu_data *rdp, int level);
463 * locking is safe against concurrent de-offloading.
468 if (rcu_segcblist_is_offloaded(&(rdp)->cblist)) \
469 raw_spin_lock(&(rdp)->nocb_lock); \