tree.h (7a1d0f23ad70cd4813bf4b72735ea2c26a4f53fe) | tree.h (ff3bb6f4d06247508489345ee90a8a9b6f3ffd3b) |
---|---|
1/* 2 * Read-Copy Update mechanism for mutual exclusion (tree-based version) 3 * Internal non-public definitions. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 67 unchanged lines hidden (view full) --- 76 77/* 78 * Definition for node within the RCU grace-period-detection hierarchy. 79 */ 80struct rcu_node { 81 raw_spinlock_t __private lock; /* Root rcu_node's lock protects */ 82 /* some rcu_state fields as well as */ 83 /* following. */ | 1/* 2 * Read-Copy Update mechanism for mutual exclusion (tree-based version) 3 * Internal non-public definitions. 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 67 unchanged lines hidden (view full) --- 76 77/* 78 * Definition for node within the RCU grace-period-detection hierarchy. 79 */ 80struct rcu_node { 81 raw_spinlock_t __private lock; /* Root rcu_node's lock protects */ 82 /* some rcu_state fields as well as */ 83 /* following. */ |
84 unsigned long gpnum; /* Current grace period for this node. */ 85 /* This will either be equal to or one */ 86 /* behind the root rcu_node's gpnum. */ 87 unsigned long completed; /* Last GP completed for this node. */ 88 /* This will either be equal to or one */ 89 /* behind the root rcu_node's gpnum. */ | |
90 unsigned long gp_seq; /* Track rsp->rcu_gp_seq. */ 91 unsigned long gp_seq_needed; /* Track rsp->rcu_gp_seq_needed. */ 92 unsigned long completedqs; /* All QSes done for this node. */ 93 unsigned long qsmask; /* CPUs or groups that need to switch in */ 94 /* order for current grace period to proceed.*/ 95 /* In leaf rcu_node, each bit corresponds to */ 96 /* an rcu_data structure, otherwise, each */ 97 /* bit corresponds to a child rcu_node */ --- 89 unchanged lines hidden (view full) --- 187 u8 exp; 188 } b; /* Bits. */ 189 u16 s; /* Set of bits, aggregate OR here. */ 190}; 191 192/* Per-CPU data for read-copy update. */ 193struct rcu_data { 194 /* 1) quiescent-state and grace-period handling : */ | 84 unsigned long gp_seq; /* Track rsp->rcu_gp_seq. */ 85 unsigned long gp_seq_needed; /* Track rsp->rcu_gp_seq_needed. */ 86 unsigned long completedqs; /* All QSes done for this node. */ 87 unsigned long qsmask; /* CPUs or groups that need to switch in */ 88 /* order for current grace period to proceed.*/ 89 /* In leaf rcu_node, each bit corresponds to */ 90 /* an rcu_data structure, otherwise, each */ 91 /* bit corresponds to a child rcu_node */ --- 89 unchanged lines hidden (view full) --- 181 u8 exp; 182 } b; /* Bits. */ 183 u16 s; /* Set of bits, aggregate OR here. */ 184}; 185 186/* Per-CPU data for read-copy update. */ 187struct rcu_data { 188 /* 1) quiescent-state and grace-period handling : */ |
195 unsigned long completed; /* Track rsp->completed gp number */ 196 /* in order to detect GP end. */ 197 unsigned long gpnum; /* Highest gp number that this CPU */ 198 /* is aware of having started. */ | |
199 unsigned long gp_seq; /* Track rsp->rcu_gp_seq counter. */ 200 unsigned long gp_seq_needed; /* Track rsp->rcu_gp_seq_needed ctr. */ 201 unsigned long rcu_qs_ctr_snap;/* Snapshot of rcu_qs_ctr to check */ 202 /* for rcu_all_qs() invocations. */ 203 union rcu_noqs cpu_no_qs; /* No QSes yet for this CPU. */ 204 bool core_needs_qs; /* Core waits for quiesc state. */ 205 bool beenonline; /* CPU online at least once. */ | 189 unsigned long gp_seq; /* Track rsp->rcu_gp_seq counter. */ 190 unsigned long gp_seq_needed; /* Track rsp->rcu_gp_seq_needed ctr. */ 191 unsigned long rcu_qs_ctr_snap;/* Snapshot of rcu_qs_ctr to check */ 192 /* for rcu_all_qs() invocations. */ 193 union rcu_noqs cpu_no_qs; /* No QSes yet for this CPU. */ 194 bool core_needs_qs; /* Core waits for quiesc state. */ 195 bool beenonline; /* CPU online at least once. */ |
206 bool gpwrap; /* Possible gpnum/completed wrap. */ | 196 bool gpwrap; /* Possible ->gp_seq wrap. */ |
207 struct rcu_node *mynode; /* This CPU's leaf of hierarchy */ 208 unsigned long grpmask; /* Mask to apply to leaf qsmask. */ 209 unsigned long ticks_this_gp; /* The number of scheduling-clock */ 210 /* ticks this CPU has handled */ 211 /* during and after the last grace */ 212 /* period it is aware of. */ 213 214 /* 2) batch handling */ --- 108 unchanged lines hidden (view full) --- 323 struct rcu_data __percpu *rda; /* pointer of percu rcu_data. */ 324 call_rcu_func_t call; /* call_rcu() flavor. */ 325 int ncpus; /* # CPUs seen so far. */ 326 327 /* The following fields are guarded by the root rcu_node's lock. */ 328 329 u8 boost ____cacheline_internodealigned_in_smp; 330 /* Subject to priority boost. */ | 197 struct rcu_node *mynode; /* This CPU's leaf of hierarchy */ 198 unsigned long grpmask; /* Mask to apply to leaf qsmask. */ 199 unsigned long ticks_this_gp; /* The number of scheduling-clock */ 200 /* ticks this CPU has handled */ 201 /* during and after the last grace */ 202 /* period it is aware of. */ 203 204 /* 2) batch handling */ --- 108 unchanged lines hidden (view full) --- 313 struct rcu_data __percpu *rda; /* pointer of percu rcu_data. */ 314 call_rcu_func_t call; /* call_rcu() flavor. */ 315 int ncpus; /* # CPUs seen so far. */ 316 317 /* The following fields are guarded by the root rcu_node's lock. */ 318 319 u8 boost ____cacheline_internodealigned_in_smp; 320 /* Subject to priority boost. */ |
331 unsigned long gpnum; /* Current gp number. */ 332 unsigned long completed; /* # of last completed gp. */ | |
333 unsigned long gp_seq; /* Grace-period sequence #. */ 334 struct task_struct *gp_kthread; /* Task for grace periods. */ 335 struct swait_queue_head gp_wq; /* Where GP task waits. */ 336 short gp_flags; /* Commands for GP task. */ 337 short gp_state; /* GP kthread sleep state. */ 338 339 /* End of fields guarded by root rcu_node's lock. */ 340 --- 159 unchanged lines hidden --- | 321 unsigned long gp_seq; /* Grace-period sequence #. */ 322 struct task_struct *gp_kthread; /* Task for grace periods. */ 323 struct swait_queue_head gp_wq; /* Where GP task waits. */ 324 short gp_flags; /* Commands for GP task. */ 325 short gp_state; /* GP kthread sleep state. */ 326 327 /* End of fields guarded by root rcu_node's lock. */ 328 --- 159 unchanged lines hidden --- |