All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.ibm.com>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>,
	Joel Fernandes <joel@joelfernandes.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	rcu@vger.kernel.org
Subject: Re: [PATCH] rcu: Move common code out of if-else block
Date: Mon, 4 Mar 2019 17:33:18 -0800	[thread overview]
Message-ID: <20190305013318.GS13351@linux.ibm.com> (raw)
In-Reply-To: <9ee20ff4-c91a-89ce-eab3-62064ec31855@gmail.com>

On Sat, Mar 02, 2019 at 05:57:17PM +0900, Akira Yokosawa wrote:
> >From 97f4bcece9a9beb792b623f847570144a0a71ccc Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@gmail.com>
> Date: Sat, 2 Mar 2019 17:25:19 +0900
> Subject: [PATCH] rcu: Move common code out of if-else block
> 
> As the result of recent addition of "rdp->core_needs_qs = false;" in
> the "if" block, now both branches of the if-else have the same
> assignment.
> 
> Factor it out and reduce line count.
> 
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> Cc: Joel Fernandes <joel@joelfernandes.org>

Queued and pushed, thank you both!

It passes (very) light rcutorture testing.  I will hit it harder
this evening.

							Thanx, Paul

> ---
> Hi Paul,
> 
> This patch is supposed to do the change mentioned in off-the-list
> correspondence.  As the earlier change by Joel has not landed on
> tip tree, I avoided mentioning the commit id of the change
> (ac2baf64948d in -rcu as of today) in the change log.
> 
> Does this work for you? 
> 
>         Thanks, Akira
> --
>  kernel/rcu/tree.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 7273ef0..449e8a4 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -1910,12 +1910,10 @@ rcu_report_qs_rdp(int cpu, struct rcu_data *rdp)
>  		return;
>  	}
>  	mask = rdp->grpmask;
> +	rdp->core_needs_qs = false;
>  	if ((rnp->qsmask & mask) == 0) {
> -		rdp->core_needs_qs = false;
>  		raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
>  	} else {
> -		rdp->core_needs_qs = false;
> -
>  		/*
>  		 * This GP can't end until cpu checks in, so all of our
>  		 * callbacks can be processed during the next GP.
> -- 
> 2.7.4
> 


      reply	other threads:[~2019-03-05  1:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02  8:57 [PATCH] rcu: Move common code out of if-else block Akira Yokosawa
2019-03-05  1:33 ` Paul E. McKenney [this message]

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=20190305013318.GS13351@linux.ibm.com \
    --to=paulmck@linux.ibm.com \
    --cc=akiyks@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.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.