Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467727

[PATCH tip/core/rcu 2/5] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again

From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject [PATCH tip/core/rcu 2/5] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again
Date 2016-08-22 17:40 +0200
Message-ID <s8Zup-86b-25@gated-at.bofh.it> (permalink)
References <s8ZkK-81a-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Jisheng Zhang <jszhang@marvell.com>

commit abedf8e2419f ("rcu: Use simple wait queues where possible in
rcutree") converts wait queues in rcutree to use simple wait queues,
but it incorrectly reverts the commit 2aa792e6faf1 ("rcu: Use
rcu_gp_kthread_wake() to wake up grace period kthreads").

This patch tries to fix the above issue by useing rcu_gp_kthread_wake()
to wake up grace period kthreads again.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcu/tree.c | 4 ++--
 1 file 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)
 	WARN_ON_ONCE(!rcu_gp_in_progress(rsp));
 	WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS);
 	raw_spin_unlock_irqrestore_rcu_node(rcu_get_root(rsp), flags);
-	swake_up(&rsp->gp_wq);  /* Memory barrier implied by swake_up() path. */
+	rcu_gp_kthread_wake(rsp);
 }
 
 /*
@@ -2970,7 +2970,7 @@ static void force_quiescent_state(struct rcu_state *rsp)
 	}
 	WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS);
 	raw_spin_unlock_irqrestore_rcu_node(rnp_old, flags);
-	swake_up(&rsp->gp_wq); /* Memory barrier implied by swake_up() path. */
+	rcu_gp_kthread_wake(rsp);
 }
 
 /*
-- 
2.5.2

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH tip/core/rcu 0/5] Miscellaneous fixes for 4.9 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:30 +0200
  [PATCH tip/core/rcu 1/5] rcu: Fix soft lockup for rcu_nocb_kthread "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:40 +0200
    Re: [PATCH tip/core/rcu 1/5] rcu: Fix soft lockup for  rcu_nocb_kthread Nikolay Borisov <n.borisov.lkml@gmail.com> - 2016-08-22 18:40 +0200
      Re: [PATCH tip/core/rcu 1/5] rcu: Fix soft lockup for  rcu_nocb_kthread Nikolay Borisov <n.borisov.lkml@gmail.com> - 2016-08-22 18:50 +0200
      Re: [PATCH tip/core/rcu 1/5] rcu: Fix soft lockup for  rcu_nocb_kthread "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 18:50 +0200
  [PATCH tip/core/rcu 2/5] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:40 +0200
  [PATCH tip/core/rcu 3/5] sched: Make wake_up_nohz_cpu() handle CPUs going offline "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:40 +0200
    Re: [PATCH tip/core/rcu 3/5] sched: Make wake_up_nohz_cpu() handle  CPUs going offline Wanpeng Li <kernellwp@gmail.com> - 2016-08-23 01:00 +0200
      Re: [PATCH tip/core/rcu 3/5] sched: Make wake_up_nohz_cpu() handle  CPUs going offline "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-23 02:50 +0200
        Re: [PATCH tip/core/rcu 3/5] sched: Make wake_up_nohz_cpu() handle  CPUs going offline Wanpeng Li <kernellwp@gmail.com> - 2016-08-23 02:50 +0200
  [PATCH tip/core/rcu 4/5] rcu: don't use modular infrastructure in non-modular code "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:40 +0200
  [PATCH tip/core/rcu 5/5] rcu: Avoid redundant quiescent-state chasing "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-08-22 17:40 +0200

csiph-web