diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcutree.c | 12 | ||||
-rw-r--r-- | kernel/rcutree.h | 7 | ||||
-rw-r--r-- | kernel/rcutree_plugin.h | 3 |
3 files changed, 11 insertions, 11 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index ac8aed8ee417..89148860e2ba 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -70,7 +70,7 @@ static struct lock_class_key rcu_fqs_class[RCU_NUM_LVLS]; | |||
70 | .fqs_state = RCU_GP_IDLE, \ | 70 | .fqs_state = RCU_GP_IDLE, \ |
71 | .gpnum = -300, \ | 71 | .gpnum = -300, \ |
72 | .completed = -300, \ | 72 | .completed = -300, \ |
73 | .onofflock = __RAW_SPIN_LOCK_UNLOCKED(&sname##_state.onofflock), \ | 73 | .orphan_lock = __RAW_SPIN_LOCK_UNLOCKED(&sname##_state.orphan_lock), \ |
74 | .orphan_nxttail = &sname##_state.orphan_nxtlist, \ | 74 | .orphan_nxttail = &sname##_state.orphan_nxtlist, \ |
75 | .orphan_donetail = &sname##_state.orphan_donelist, \ | 75 | .orphan_donetail = &sname##_state.orphan_donelist, \ |
76 | .barrier_mutex = __MUTEX_INITIALIZER(sname##_state.barrier_mutex), \ | 76 | .barrier_mutex = __MUTEX_INITIALIZER(sname##_state.barrier_mutex), \ |
@@ -1573,7 +1573,7 @@ rcu_check_quiescent_state(struct rcu_state *rsp, struct rcu_data *rdp) | |||
1573 | /* | 1573 | /* |
1574 | * Send the specified CPU's RCU callbacks to the orphanage. The | 1574 | * Send the specified CPU's RCU callbacks to the orphanage. The |
1575 | * specified CPU must be offline, and the caller must hold the | 1575 | * specified CPU must be offline, and the caller must hold the |
1576 | * ->onofflock. | 1576 | * ->orphan_lock. |
1577 | */ | 1577 | */ |
1578 | static void | 1578 | static void |
1579 | rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, | 1579 | rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, |
@@ -1623,7 +1623,7 @@ rcu_send_cbs_to_orphanage(int cpu, struct rcu_state *rsp, | |||
1623 | 1623 | ||
1624 | /* | 1624 | /* |
1625 | * Adopt the RCU callbacks from the specified rcu_state structure's | 1625 | * Adopt the RCU callbacks from the specified rcu_state structure's |
1626 | * orphanage. The caller must hold the ->onofflock. | 1626 | * orphanage. The caller must hold the ->orphan_lock. |
1627 | */ | 1627 | */ |
1628 | static void rcu_adopt_orphan_cbs(struct rcu_state *rsp) | 1628 | static void rcu_adopt_orphan_cbs(struct rcu_state *rsp) |
1629 | { | 1629 | { |
@@ -1702,7 +1702,7 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp) | |||
1702 | 1702 | ||
1703 | /* Exclude any attempts to start a new grace period. */ | 1703 | /* Exclude any attempts to start a new grace period. */ |
1704 | mutex_lock(&rsp->onoff_mutex); | 1704 | mutex_lock(&rsp->onoff_mutex); |
1705 | raw_spin_lock_irqsave(&rsp->onofflock, flags); | 1705 | raw_spin_lock_irqsave(&rsp->orphan_lock, flags); |
1706 | 1706 | ||
1707 | /* Orphan the dead CPU's callbacks, and adopt them if appropriate. */ | 1707 | /* Orphan the dead CPU's callbacks, and adopt them if appropriate. */ |
1708 | rcu_send_cbs_to_orphanage(cpu, rsp, rnp, rdp); | 1708 | rcu_send_cbs_to_orphanage(cpu, rsp, rnp, rdp); |
@@ -1729,10 +1729,10 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp) | |||
1729 | /* | 1729 | /* |
1730 | * We still hold the leaf rcu_node structure lock here, and | 1730 | * We still hold the leaf rcu_node structure lock here, and |
1731 | * irqs are still disabled. The reason for this subterfuge is | 1731 | * irqs are still disabled. The reason for this subterfuge is |
1732 | * because invoking rcu_report_unblock_qs_rnp() with ->onofflock | 1732 | * because invoking rcu_report_unblock_qs_rnp() with ->orphan_lock |
1733 | * held leads to deadlock. | 1733 | * held leads to deadlock. |
1734 | */ | 1734 | */ |
1735 | raw_spin_unlock(&rsp->onofflock); /* irqs remain disabled. */ | 1735 | raw_spin_unlock(&rsp->orphan_lock); /* irqs remain disabled. */ |
1736 | rnp = rdp->mynode; | 1736 | rnp = rdp->mynode; |
1737 | if (need_report & RCU_OFL_TASKS_NORM_GP) | 1737 | if (need_report & RCU_OFL_TASKS_NORM_GP) |
1738 | rcu_report_unblock_qs_rnp(rnp, flags); | 1738 | rcu_report_unblock_qs_rnp(rnp, flags); |
diff --git a/kernel/rcutree.h b/kernel/rcutree.h index a240f032848e..a7c945d149cf 100644 --- a/kernel/rcutree.h +++ b/kernel/rcutree.h | |||
@@ -383,9 +383,8 @@ struct rcu_state { | |||
383 | 383 | ||
384 | /* End of fields guarded by root rcu_node's lock. */ | 384 | /* End of fields guarded by root rcu_node's lock. */ |
385 | 385 | ||
386 | raw_spinlock_t onofflock ____cacheline_internodealigned_in_smp; | 386 | raw_spinlock_t orphan_lock ____cacheline_internodealigned_in_smp; |
387 | /* exclude on/offline and */ | 387 | /* Protect following fields. */ |
388 | /* starting new GP. */ | ||
389 | struct rcu_head *orphan_nxtlist; /* Orphaned callbacks that */ | 388 | struct rcu_head *orphan_nxtlist; /* Orphaned callbacks that */ |
390 | /* need a grace period. */ | 389 | /* need a grace period. */ |
391 | struct rcu_head **orphan_nxttail; /* Tail of above. */ | 390 | struct rcu_head **orphan_nxttail; /* Tail of above. */ |
@@ -394,7 +393,7 @@ struct rcu_state { | |||
394 | struct rcu_head **orphan_donetail; /* Tail of above. */ | 393 | struct rcu_head **orphan_donetail; /* Tail of above. */ |
395 | long qlen_lazy; /* Number of lazy callbacks. */ | 394 | long qlen_lazy; /* Number of lazy callbacks. */ |
396 | long qlen; /* Total number of callbacks. */ | 395 | long qlen; /* Total number of callbacks. */ |
397 | /* End of fields guarded by onofflock. */ | 396 | /* End of fields guarded by orphan_lock. */ |
398 | 397 | ||
399 | struct mutex onoff_mutex; /* Coordinate hotplug & GPs. */ | 398 | struct mutex onoff_mutex; /* Coordinate hotplug & GPs. */ |
400 | 399 | ||
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index f92115488187..2b281cf0b6f2 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h | |||
@@ -757,7 +757,8 @@ static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp, | |||
757 | * grace period for the specified rcu_node structure. If there are no such | 757 | * grace period for the specified rcu_node structure. If there are no such |
758 | * tasks, report it up the rcu_node hierarchy. | 758 | * tasks, report it up the rcu_node hierarchy. |
759 | * | 759 | * |
760 | * Caller must hold sync_rcu_preempt_exp_mutex and rsp->onofflock. | 760 | * Caller must hold sync_rcu_preempt_exp_mutex and must exclude |
761 | * CPU hotplug operations. | ||
761 | */ | 762 | */ |
762 | static void | 763 | static void |
763 | sync_rcu_preempt_exp_init(struct rcu_state *rsp, struct rcu_node *rnp) | 764 | sync_rcu_preempt_exp_init(struct rcu_state *rsp, struct rcu_node *rnp) |