All of lore.kernel.org
 help / color / mirror / Atom feed
From: paulmck@linux.vnet.ibm.com (Paul E. McKenney)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again
Date: Wed, 22 Jun 2016 05:08:53 -0700	[thread overview]
Message-ID: <20160622120853.GI3923@linux.vnet.ibm.com> (raw)
In-Reply-To: <1466587167-3541-1-git-send-email-jszhang@marvell.com>

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
> 

WARNING: multiple messages have this Message-ID (diff)
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Jisheng Zhang <jszhang@marvell.com>
Cc: josh@joshtriplett.org, rostedt@goodmis.org,
	mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again
Date: Wed, 22 Jun 2016 05:08:53 -0700	[thread overview]
Message-ID: <20160622120853.GI3923@linux.vnet.ibm.com> (raw)
In-Reply-To: <1466587167-3541-1-git-send-email-jszhang@marvell.com>

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
> 

  reply	other threads:[~2016-06-22 12:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22  9:19 [PATCH] rcu: Use rcu_gp_kthread_wake() to wake up grace period kthreads again Jisheng Zhang
2016-06-22  9:19 ` Jisheng Zhang
2016-06-22 12:08 ` Paul E. McKenney [this message]
2016-06-22 12:08   ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160622120853.GI3923@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.