All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Neeraj Upadhyay <neeraju@codeaurora.org>
Cc: josh@joshtriplett.org, rostedt@goodmis.org,
	mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rcu: Fix up pending cbs check in rcu_prepare_for_idle
Date: Mon, 7 Aug 2017 05:40:52 -0700	[thread overview]
Message-ID: <20170807124052.GU3730@linux.vnet.ibm.com> (raw)
In-Reply-To: <1502085010-30316-1-git-send-email-neeraju@codeaurora.org>

On Mon, Aug 07, 2017 at 11:20:10AM +0530, Neeraj Upadhyay wrote:
> Pending cbs check in rcu_prepare_for_idle is inversed
> in the sense that, it should accelerate if there are
> pending cbs; but, the check does the opposite. So,
> fix it.
> 
> Fixes: 15fecf89e46a ("srcu: Abstract multi-tail callback list handling")
> Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>

Good catch!  Queued for review and testing.

Just out of curiosity, how did you find this one?

							Thanx, Paul

> ---
>  kernel/rcu/tree_plugin.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index 908b309..b8f51df 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -1493,7 +1493,7 @@ static void rcu_prepare_for_idle(void)
>  	rdtp->last_accelerate = jiffies;
>  	for_each_rcu_flavor(rsp) {
>  		rdp = this_cpu_ptr(rsp->rda);
> -		if (rcu_segcblist_pend_cbs(&rdp->cblist))
> +		if (!rcu_segcblist_pend_cbs(&rdp->cblist))
>  			continue;
>  		rnp = rdp->mynode;
>  		raw_spin_lock_rcu_node(rnp); /* irqs already disabled. */
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
> member of the Code Aurora Forum, hosted by The Linux Foundation
> 

  reply	other threads:[~2017-08-07 12:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07  5:50 [PATCH] rcu: Fix up pending cbs check in rcu_prepare_for_idle Neeraj Upadhyay
2017-08-07 12:40 ` Paul E. McKenney [this message]
2017-08-07 14:01   ` Neeraj Upadhyay
2017-08-07 14:09     ` 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=20170807124052.GU3730@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=neeraju@codeaurora.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.