This commit cleans up some comments and code in kernel/rcu/tree.c.
Unified · Split
| @@ -202,7 +202,7 @@ EXPORT_SYMBOL_GPL(rcu_get_gp_kthreads_prio); · 201 unmodified lines | ||
| 202 | 202 | * the need for long delays to increase some race probabilities with the |
| 203 | 203 | * need for fast grace periods to increase other race probabilities. |
| 204 | 204 | */ |
| 205 | −#define PER_RCU_NODE_PERIOD 3 /* Number of grace periods between delays. */ | |
| 205 | +#define PER_RCU_NODE_PERIOD 3 /* Number of grace periods between delays for debugging. */ | |
| 206 | 206 | |
| 207 | 207 | /* |
| 208 | 208 | * Compute the mask of online CPUs for the specified rcu_node structure. |
| @@ -937,7 +937,7 @@ EXPORT_SYMBOL_GPL(rcu_idle_exit); · 728 unmodified lines | ||
| 937 | 937 | */ |
| 938 | 938 | void noinstr rcu_user_exit(void) |
| 939 | 939 | { |
| 940 | − rcu_eqs_exit(1); | |
| 940 | + rcu_eqs_exit(true); | |
| 941 | 941 | } |
| 942 | 942 | |
| 943 | 943 | /** |
| @@ -1203,7 +1203,7 @@ EXPORT_SYMBOL_GPL(rcu_lockdep_current_cpu_online); · 259 unmodified lines | ||
| 1203 | 1203 | #endif /* #if defined(CONFIG_PROVE_RCU) && defined(CONFIG_HOTPLUG_CPU) */ |
| 1204 | 1204 | |
| 1205 | 1205 | /* |
| 1206 | − * We are reporting a quiescent state on behalf of some other CPU, so | |
| 1206 | + * When trying to report a quiescent state on behalf of some other CPU, | |
| 1207 | 1207 | * it is our responsibility to check for and handle potential overflow |
| 1208 | 1208 | * of the rcu_node ->gp_seq counter with respect to the rcu_data counters. |
| 1209 | 1209 | * After all, the CPU might be in deep idle state, and thus executing no |
| @@ -2607,7 +2607,7 @@ static void rcu_do_batch(struct rcu_data *rdp) · 1397 unmodified lines | ||
| 2607 | 2607 | * state, for example, user mode or idle loop. It also schedules RCU |
| 2608 | 2608 | * core processing. If the current grace period has gone on too long, |
| 2609 | 2609 | * it will ask the scheduler to manufacture a context switch for the sole |
| 2610 | − * purpose of providing a providing the needed quiescent state. | |
| 2610 | + * purpose of providing the needed quiescent state. | |
| 2611 | 2611 | */ |
| 2612 | 2612 | void rcu_sched_clock_irq(int user) |
| 2613 | 2613 | { |
| @@ -3236,7 +3236,7 @@ put_cached_bnode(struct kfree_rcu_cpu *krcp, · 622 unmodified lines | ||
| 3236 | 3236 | |
| 3237 | 3237 | /* |
| 3238 | 3238 | * This function is invoked in workqueue context after a grace period. |
| 3239 | − * It frees all the objects queued on ->bhead_free or ->head_free. | |
| 3239 | + * It frees all the objects queued on ->bkvhead_free or ->head_free. | |
| 3240 | 3240 | */ |
| 3241 | 3241 | static void kfree_rcu_work(struct work_struct *work) |
| 3242 | 3242 | { |
| @@ -3263,7 +3263,7 @@ static void kfree_rcu_work(struct work_struct *work) · 20 unmodified lines | ||
| 3263 | 3263 | krwp->head_free = NULL; |
| 3264 | 3264 | raw_spin_unlock_irqrestore(&krcp->lock, flags); |
| 3265 | 3265 | |
| 3266 | − // Handle two first channels. | |
| 3266 | + // Handle the first two channels. | |
| 3267 | 3267 | for (i = 0; i < FREE_N_CHANNELS; i++) { |
| 3268 | 3268 | for (; bkvhead[i]; bkvhead[i] = bnext) { |
| 3269 | 3269 | bnext = bkvhead[i]->next; |
| @@ -3530,11 +3530,11 @@ add_ptr_to_bulk_krc_lock(struct kfree_rcu_cpu **krcp, · 260 unmodified lines | ||
| 3530 | 3530 | } |
| 3531 | 3531 | |
| 3532 | 3532 | /* |
| 3533 | − * Queue a request for lazy invocation of appropriate free routine after a | |
| 3534 | − * grace period. Please note there are three paths are maintained, two are the | |
| 3535 | − * main ones that use array of pointers interface and third one is emergency | |
| 3536 | − * one, that is used only when the main path can not be maintained temporary, | |
| 3537 | − * due to memory pressure. | |
| 3533 | + * Queue a request for lazy invocation of the appropriate free routine | |
| 3534 | + * after a grace period. Please note that three paths are maintained, | |
| 3535 | + * two for the common case using arrays of pointers and a third one that | |
| 3536 | + * is used only when the main paths cannot be used, for example, due to | |
| 3537 | + * memory pressure. | |
| 3538 | 3538 | * |
| 3539 | 3539 | * Each kvfree_call_rcu() request is added to a batch. The batch will be drained |
| 3540 | 3540 | * every KFREE_DRAIN_JIFFIES number of jiffies. All the objects in the batch will |
| @@ -4708,7 +4708,7 @@ void __init rcu_init(void) · 1167 unmodified lines | ||
| 4708 | 4708 | rcutree_online_cpu(cpu); |
| 4709 | 4709 | } |
| 4710 | 4710 | |
| 4711 | − /* Create workqueue for expedited GPs and for Tree SRCU. */ | |
| 4711 | + /* Create workqueue for Tree SRCU and for expedited GPs. */ | |
| 4712 | 4712 | rcu_gp_wq = alloc_workqueue("rcu_gp", WQ_MEM_RECLAIM, 0); |
| 4713 | 4713 | WARN_ON(!rcu_gp_wq); |
| 4714 | 4714 | rcu_par_gp_wq = alloc_workqueue("rcu_par_gp", WQ_MEM_RECLAIM, 0); |