Lines Matching +full:half +full:- +full:period
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. */
49 /* order for current grace period to proceed.*/
56 /* Per-GP initial value for qsmask. */
57 /* Initialized from ->qsmaskinitnext at the */
58 /* beginning of each grace period. */
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. */
84 /* exit RCU read-side critical sections */
89 /* Tasks blocked in RCU read-side critical */
94 /* current grace period, or NULL if there */
98 /* current expedited grace period, or NULL */
100 /* is no current expedited grace period, */
108 /* are blocking the current grace period, */
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))
161 * Record the snapshot of the core stats at half of the first RCU stall timeout.
163 * during the sampling period. The snapshot is taken only if this gp_seq is not
164 * equal to rdp->gp_seq.
167 unsigned long gp_seq; /* Track rdp->gp_seq counter */
181 * - DEFER_QS_IDLE: An IRQ work is yet to be scheduled.
182 * - DEFER_QS_PENDING: An IRQ work was scheduled but either not yet run, or it
188 /* Per-CPU data for read-copy update. */
190 /* 1) quiescent-state and grace-period handling : */
191 unsigned long gp_seq; /* Track rsp->gp_seq counter. */
196 bool gpwrap; /* Possible ->gp_seq wrap. */
201 unsigned long ticks_this_gp; /* The number of scheduling-clock */
204 /* period it is aware of. */
221 int watching_snap; /* Per-GP tracking for dynticks. */
230 int exp_watching_snap; /* Double-check need for IPI. */
246 struct rcu_cblist nocb_bypass; /* Lock-contention-bypass CB list. */
248 unsigned long nocb_nobypass_last; /* Last ->cblist enqueue (jiffies). */
249 int nocb_nobypass_count; /* # ->cblist enqueues at ^^^ time. */
256 unsigned long nocb_gp_seq; /* If so, ->gp_seq to wait for. */
266 struct rcu_data *nocb_toggling_rdp; /* rdp queued for (de-)offloading */
270 /* GP rdp takes GP-end wakeups. */
275 /* rcuc per-CPU kthread or NULL. */
282 /* ->rcu_iw* fields protected by leaf rcu_node ->lock. */
283 struct irq_work rcu_iw; /* Check for non-irq activity. */
284 bool rcu_iw_pending; /* Is ->rcu_iw pending? */
285 unsigned long rcu_iw_gp_seq; /* ->gp_seq associated with ->rcu_iw. */
286 unsigned long rcu_ofl_gp_seq; /* ->gp_seq at last offline. */
287 short rcu_ofl_gp_state; /* ->gp_state at last offline. */
288 unsigned long rcu_onl_gp_seq; /* ->gp_seq at last online. */
289 short rcu_onl_gp_state; /* ->gp_state at last online. */
292 struct rcu_snap_record snap_record; /* Snapshot of core stats at half of */
312 /* quiescent-state forcing. */
345 * of the hierarchy is in ->node[0] (referenced by ->level[0]), the second
346 * level in ->node[1] through ->node[m] (->node[1] referenced by ->level[1]),
347 * and the third level in ->node[m+1] and following (->node[m+1] referenced
348 * by ->level[2]). The number of levels is determined by the number of
363 /* Grace-period sequence #. */
371 unsigned long gp_wake_seq; /* ->gp_seq at ^^^. */
373 unsigned long gp_seq_polled_snap; /* ->gp_seq_polled at normal GP start. */
374 unsigned long gp_seq_polled_exp_snap; /* ->gp_seq_polled at expedited GP start. */
385 raw_spinlock_t barrier_lock; /* Protects ->barrier_seq_snap. */
391 struct swait_queue_head expedited_wq; /* Wait for check-ins. */
425 /* GP pre-initialization. */
436 struct mutex nocb_mutex; /* Guards (de-)offloading */
442 #define RCU_GP_FLAG_INIT 0x1 /* Need grace-period initialization. */
443 #define RCU_GP_FLAG_FQS 0x2 /* Need grace-period quiescent-state forcing. */
448 #define RCU_GP_WAIT_GPS 1 /* Wait for grace-period start. */
449 #define RCU_GP_DONE_GPS 2 /* Wait done for grace-period start. */
450 #define RCU_GP_ONOFF 3 /* Grace-period initialization hotplug. */
451 #define RCU_GP_INIT 4 /* Grace-period initialization. */
452 #define RCU_GP_WAIT_FQS 5 /* Wait for force-quiescent-state time. */
453 #define RCU_GP_DOING_FQS 6 /* Wait done for force-quiescent-state time. */
454 #define RCU_GP_CLEANUP 7 /* Grace-period cleanup started. */
455 #define RCU_GP_CLEANED 8 /* Grace-period cleanup complete. */
525 * locking is safe against concurrent de-offloading.
530 if (rcu_segcblist_is_offloaded(&(rdp)->cblist)) \
531 raw_spin_lock(&(rdp)->nocb_lock); \