rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again
PATCH 1/1 rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again
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.
--- kernel/rcu/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/rcu/tree.c +2 -2
@@ -2333,7 +2333,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); }/*
@@ -2961,7 +2961,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); }/*
Signature · 1 line
2.8.1
Quoted 9 lines · Jisheng Zhang
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 commit2aa792e6faf1("rcu: Usercu_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 <[email protected]>
Good catch! Queued for testing and review.
Thanx, Paul
Quoted 29 lines
--- kernel/rcu/tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kernel/rcu/tree.c +2
-2@@ -2333,7 +2333,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); }/* @@ -2961,7 +2961,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); }/* Signature · 1 line
2.8.1