diff options
author | Jisheng Zhang <jszhang@marvell.com> | 2016-06-22 05:19:27 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2016-08-22 12:33:46 -0400 |
commit | 94d44776737266eccafee32b985fe31fd5e021ca (patch) | |
tree | 93c4bd1645b181b0bde5d8a7647740d68bc337f7 /kernel/rcu | |
parent | bedc1969150d480c462cdac320fa944b694a7162 (diff) |
rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads
Commit abedf8e2419f ("rcu: Use simple wait queues where possible in
rcutree") converts Tree RCU's wait queues to simple wait queues,
but it incorrectly reverts the commit 2aa792e6faf1 ("rcu: Use
rcu_gp_kthread_wake() to wake up grace period kthreads"). This can
result in redundant self-wakeups.
This commit therefore replaces the simple wait-queue wakeups with
rcu_gp_kthread_wake(), thus avoiding the redundant wakeups.
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 5d80925e7fc8..cc1779a7ec5f 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -2344,7 +2344,7 @@ static void rcu_report_qs_rsp(struct rcu_state *rsp, unsigned long flags) | |||
2344 | WARN_ON_ONCE(!rcu_gp_in_progress(rsp)); | 2344 | WARN_ON_ONCE(!rcu_gp_in_progress(rsp)); |
2345 | WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS); | 2345 | WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS); |
2346 | raw_spin_unlock_irqrestore_rcu_node(rcu_get_root(rsp), flags); | 2346 | raw_spin_unlock_irqrestore_rcu_node(rcu_get_root(rsp), flags); |
2347 | swake_up(&rsp->gp_wq); /* Memory barrier implied by swake_up() path. */ | 2347 | rcu_gp_kthread_wake(rsp); |
2348 | } | 2348 | } |
2349 | 2349 | ||
2350 | /* | 2350 | /* |
@@ -2970,7 +2970,7 @@ static void force_quiescent_state(struct rcu_state *rsp) | |||
2970 | } | 2970 | } |
2971 | WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS); | 2971 | WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS); |
2972 | raw_spin_unlock_irqrestore_rcu_node(rnp_old, flags); | 2972 | raw_spin_unlock_irqrestore_rcu_node(rnp_old, flags); |
2973 | swake_up(&rsp->gp_wq); /* Memory barrier implied by swake_up() path. */ | 2973 | rcu_gp_kthread_wake(rsp); |
2974 | } | 2974 | } |
2975 | 2975 | ||
2976 | /* | 2976 | /* |