public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] rcu: Remove unnecessary condition check in rcu_qsctr_help()
Date: Wed, 11 Feb 2015 08:09:24 -0800	[thread overview]
Message-ID: <20150211160924.GF4166@linux.vnet.ibm.com> (raw)
In-Reply-To: <dd7b08705722992b3873e0ddeee35ae5ae3e7928.1423665396.git.agordeev@redhat.com>

On Wed, Feb 11, 2015 at 03:42:37PM +0100, Alexander Gordeev wrote:
> In cases ->curtail and ->donetail pointers differ ->rcucblist
> always points to the beginning of the current list and thus
> can not be NULL. Therefore, the check ->rcucblist != NULL is
> redundant and could be removed.
> 
> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Alexander Gordeev <agordeev@redhat.com>

Good point, queued for 3.21.

							Thanx, Paul

> ---
>  kernel/rcu/tiny.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel/rcu/tiny.c b/kernel/rcu/tiny.c
> index cc9ceca..d4e7fe5 100644
> --- a/kernel/rcu/tiny.c
> +++ b/kernel/rcu/tiny.c
> @@ -103,8 +103,7 @@ EXPORT_SYMBOL(__rcu_is_watching);
>  static int rcu_qsctr_help(struct rcu_ctrlblk *rcp)
>  {
>  	RCU_TRACE(reset_cpu_stall_ticks(rcp));
> -	if (rcp->rcucblist != NULL &&
> -	    rcp->donetail != rcp->curtail) {
> +	if (rcp->donetail != rcp->curtail) {
>  		rcp->donetail = rcp->curtail;
>  		return 1;
>  	}
> -- 
> 1.8.3.1
> 


  reply	other threads:[~2015-02-11 16:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11 14:42 [PATCH 0/3] rcu: Tweak tiny RCU Alexander Gordeev
2015-02-11 14:42 ` [PATCH 1/3] rcu: Remove unnecessary condition check in rcu_qsctr_help() Alexander Gordeev
2015-02-11 16:09   ` Paul E. McKenney [this message]
2015-02-11 14:42 ` [PATCH 2/3] rcu: Remove fast path from __rcu_process_callbacks() Alexander Gordeev
2015-02-11 16:11   ` Paul E. McKenney
2015-02-11 14:42 ` [PATCH 3/3] rcu: Call trace_rcu_batch_start() with enabled interrupts Alexander Gordeev
2015-02-11 16:13   ` Paul E. McKenney
2015-02-11 16:48     ` Alexander Gordeev
2015-02-11 17:20       ` 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=20150211160924.GF4166@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=agordeev@redhat.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox