diff options
Diffstat (limited to 'kernel/rcu/tree_plugin.h')
-rw-r--r-- | kernel/rcu/tree_plugin.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index f60dd6ea8333..0cb0816036c5 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -1744,6 +1744,7 @@ int rcu_needs_cpu(int cpu, unsigned long *dj) | |||
1744 | static void rcu_prepare_for_idle(int cpu) | 1744 | static void rcu_prepare_for_idle(int cpu) |
1745 | { | 1745 | { |
1746 | #ifndef CONFIG_RCU_NOCB_CPU_ALL | 1746 | #ifndef CONFIG_RCU_NOCB_CPU_ALL |
1747 | bool needwake; | ||
1747 | struct rcu_data *rdp; | 1748 | struct rcu_data *rdp; |
1748 | struct rcu_dynticks *rdtp = &per_cpu(rcu_dynticks, cpu); | 1749 | struct rcu_dynticks *rdtp = &per_cpu(rcu_dynticks, cpu); |
1749 | struct rcu_node *rnp; | 1750 | struct rcu_node *rnp; |
@@ -1792,8 +1793,10 @@ static void rcu_prepare_for_idle(int cpu) | |||
1792 | rnp = rdp->mynode; | 1793 | rnp = rdp->mynode; |
1793 | raw_spin_lock(&rnp->lock); /* irqs already disabled. */ | 1794 | raw_spin_lock(&rnp->lock); /* irqs already disabled. */ |
1794 | smp_mb__after_unlock_lock(); | 1795 | smp_mb__after_unlock_lock(); |
1795 | rcu_accelerate_cbs(rsp, rnp, rdp); | 1796 | needwake = rcu_accelerate_cbs(rsp, rnp, rdp); |
1796 | raw_spin_unlock(&rnp->lock); /* irqs remain disabled. */ | 1797 | raw_spin_unlock(&rnp->lock); /* irqs remain disabled. */ |
1798 | if (needwake) | ||
1799 | rcu_gp_kthread_wake(rsp); | ||
1797 | } | 1800 | } |
1798 | #endif /* #ifndef CONFIG_RCU_NOCB_CPU_ALL */ | 1801 | #endif /* #ifndef CONFIG_RCU_NOCB_CPU_ALL */ |
1799 | } | 1802 | } |
@@ -2230,12 +2233,15 @@ static void rcu_nocb_wait_gp(struct rcu_data *rdp) | |||
2230 | unsigned long c; | 2233 | unsigned long c; |
2231 | bool d; | 2234 | bool d; |
2232 | unsigned long flags; | 2235 | unsigned long flags; |
2236 | bool needwake; | ||
2233 | struct rcu_node *rnp = rdp->mynode; | 2237 | struct rcu_node *rnp = rdp->mynode; |
2234 | 2238 | ||
2235 | raw_spin_lock_irqsave(&rnp->lock, flags); | 2239 | raw_spin_lock_irqsave(&rnp->lock, flags); |
2236 | smp_mb__after_unlock_lock(); | 2240 | smp_mb__after_unlock_lock(); |
2237 | c = rcu_start_future_gp(rnp, rdp); | 2241 | needwake = rcu_start_future_gp(rnp, rdp, &c); |
2238 | raw_spin_unlock_irqrestore(&rnp->lock, flags); | 2242 | raw_spin_unlock_irqrestore(&rnp->lock, flags); |
2243 | if (needwake) | ||
2244 | rcu_gp_kthread_wake(rdp->rsp); | ||
2239 | 2245 | ||
2240 | /* | 2246 | /* |
2241 | * Wait for the grace period. Do so interruptibly to avoid messing | 2247 | * Wait for the grace period. Do so interruptibly to avoid messing |