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.
39 * Definition for node within the RCU grace-period-detection hierarchy.
45 unsigned long gp_seq; /* Track rsp->gp_seq. */
56 /* Per-GP initial value for qsmask. */
57 /* Initialized from ->qsmaskinitnext at the */
64 /* Per-GP initial values for expmask. */
65 /* Initialized from ->expmaskinitnext at the */
79 int grplo; /* lowest-numbered CPU here. */
80 int grphi; /* highest-numbered CPU here. */
81 u8 grpnum; /* group number for next level up. */
82 u8 level; /* root is at level 0. */ member
84 /* exit RCU read-side critical sections */
89 /* Tasks blocked in RCU read-side critical */
111 /* Used only for the priority-boosting */
144 * This generates the bit for a CPU in node-local masks.
146 #define leaf_node_cpu_bit(rnp, cpu) (BIT((cpu) - (rnp)->grplo))
164 * equal to rdp->gp_seq.
167 unsigned long gp_seq; /* Track rdp->gp_seq counter */
177 /* Per-CPU data for read-copy update. */
179 /* 1) quiescent-state and grace-period handling : */
180 unsigned long gp_seq; /* Track rsp->gp_seq counter. */
185 bool gpwrap; /* Possible ->gp_seq wrap. */
189 unsigned long ticks_this_gp; /* The number of scheduling-clock */
191 /* during and after the last grace */
202 /* qlen at last check for QS forcing */
209 int watching_snap; /* Per-GP tracking for dynticks. */
218 int exp_watching_snap; /* Double-check need for IPI. */
228 unsigned long nocb_gp_adv_time; /* Last call_rcu() CB adv (jiffies). */
234 struct rcu_cblist nocb_bypass; /* Lock-contention-bypass CB list. */
236 unsigned long nocb_nobypass_last; /* Last ->cblist enqueue (jiffies). */
237 int nocb_nobypass_count; /* # ->cblist enqueues at ^^^ time. */
242 u8 nocb_gp_bypass; /* Found a bypass on last scan? */
243 u8 nocb_gp_gp; /* GP to wait for on last scan? */
244 unsigned long nocb_gp_seq; /* If so, ->gp_seq to wait for. */
254 struct rcu_data *nocb_toggling_rdp; /* rdp queued for (de-)offloading */
258 /* GP rdp takes GP-end wakeups. */
263 /* rcuc per-CPU kthread or NULL. */
270 /* ->rcu_iw* fields protected by leaf rcu_node ->lock. */
271 struct irq_work rcu_iw; /* Check for non-irq activity. */
272 bool rcu_iw_pending; /* Is ->rcu_iw pending? */
273 unsigned long rcu_iw_gp_seq; /* ->gp_seq associated with ->rcu_iw. */
274 unsigned long rcu_ofl_gp_seq; /* ->gp_seq at last offline. */
275 short rcu_ofl_gp_state; /* ->gp_state at last offline. */
276 unsigned long rcu_onl_gp_seq; /* ->gp_seq at last online. */
277 short rcu_onl_gp_state; /* ->gp_state at last online. */
278 unsigned long last_fqs_resched; /* Time of last rcu_resched(). */
279 unsigned long last_sched_clock; /* Jiffies of last rcu_sched_clock_irq(). */
300 /* quiescent-state forcing. */
332 * represented in "heap" form in a dense array. The root (first level)
333 * of the hierarchy is in ->node[0] (referenced by ->level[0]), the second
334 * level in ->node[1] through ->node[m] (->node[1] referenced by ->level[1]),
335 * and the third level in ->node[m+1] and following (->node[m+1] referenced
336 * by ->level[2]). The number of levels is determined by the number of
342 struct rcu_node *level[RCU_NUM_LVLS + 1]; member
351 /* Grace-period sequence #. */
358 unsigned long gp_wake_time; /* Last GP kthread wake. */
359 unsigned long gp_wake_seq; /* ->gp_seq at ^^^. */
361 unsigned long gp_seq_polled_snap; /* ->gp_seq_polled at normal GP start. */
362 unsigned long gp_seq_polled_exp_snap; /* ->gp_seq_polled at expedited GP start. */
373 raw_spinlock_t barrier_lock; /* Protects ->barrier_seq_snap. */
379 struct swait_queue_head expedited_wq; /* Wait for check-ins. */
380 int ncpus_snap; /* # CPUs seen last time. */
392 unsigned long gp_end; /* Time last GP ended, again */
394 unsigned long gp_activity; /* Time of last GP kthread */
396 unsigned long gp_req_activity; /* Time of last GP request */
413 /* GP pre-initialization. */
424 struct mutex nocb_mutex; /* Guards (de-)offloading */
430 #define RCU_GP_FLAG_INIT 0x1 /* Need grace-period initialization. */
431 #define RCU_GP_FLAG_FQS 0x2 /* Need grace-period quiescent-state forcing. */
436 #define RCU_GP_WAIT_GPS 1 /* Wait for grace-period start. */
437 #define RCU_GP_DONE_GPS 2 /* Wait done for grace-period start. */
438 #define RCU_GP_ONOFF 3 /* Grace-period initialization hotplug. */
439 #define RCU_GP_INIT 4 /* Grace-period initialization. */
440 #define RCU_GP_WAIT_FQS 5 /* Wait for force-quiescent-state time. */
441 #define RCU_GP_DOING_FQS 6 /* Wait done for force-quiescent-state time. */
442 #define RCU_GP_CLEANUP 7 /* Grace-period cleanup started. */
443 #define RCU_GP_CLEANED 8 /* Grace-period cleanup complete. */
497 static int rcu_nocb_need_deferred_wakeup(struct rcu_data *rdp, int level);
512 * locking is safe against concurrent de-offloading.
517 if (rcu_segcblist_is_offloaded(&(rdp)->cblist)) \
518 raw_spin_lock(&(rdp)->nocb_lock); \