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


Groups > linux.kernel > #1428603 > unrolled thread

[PATCH] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again

Started byJisheng Zhang <jszhang@marvell.com>
First post2016-06-22 11:30 +0200
Last post2016-06-22 14:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again Jisheng Zhang <jszhang@marvell.com> - 2016-06-22 11:30 +0200
    Re: [PATCH] rcu: Use rcu_gp_kthread_wake() to wake up grace period  kthreads again "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-06-22 14:10 +0200

#1428603 — [PATCH] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again

FromJisheng Zhang <jszhang@marvell.com>
Date2016-06-22 11:30 +0200
Subject[PATCH] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again
Message-ID<rMMDY-1zb-11@gated-at.bofh.it>
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>
---
 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 c7f1bc4..c270ce0 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -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);
 }
 
 /*
-- 
2.8.1

[toc] | [next] | [standalone]


#1428725 — Re: [PATCH] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2016-06-22 14:10 +0200
SubjectRe: [PATCH] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again
Message-ID<rMP8J-3bX-11@gated-at.bofh.it>
In reply to#1428603
On Wed, Jun 22, 2016 at 05:19:27PM +0800, Jisheng Zhang wrote:
> 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>

Good catch!  Queued for testing and review.

							Thanx, Paul

> ---
>  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 c7f1bc4..c270ce0 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -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);
>  }
> 
>  /*
> -- 
> 2.8.1
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web