mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Neeraj Upadhyay <neeraju@codeaurora.org>
Cc: josh@joshtriplett.org, rostedt@goodmis.org,
	mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com,
	joel@joelfernandes.org, rcu@vger.kernel.org,
	linux-kernel@vger.kernel.org, urezki@gmail.com,
	frederic@kernel.org, boqun.feng@gmail.com
Subject: Re: [PATCH] rcu: Fix existing exp request check in sync_sched_exp_online_cleanup()
Date: Wed, 18 Aug 2021 08:51:51 -0700	[thread overview]
Message-ID: <20210818155151.GV4126399@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <1629273840-729-1-git-send-email-neeraju@codeaurora.org>

On Wed, Aug 18, 2021 at 01:34:00PM +0530, Neeraj Upadhyay wrote:
> The sync_sched_exp_online_cleanup() checks to see if RCU needs
> an expedited quiescent state from the incoming CPU, sending it
> an IPI if so. Before sending IPI, it checks whether expedited
> qs need has been already requested for the incoming CPU, by
> checking rcu_data.cpu_no_qs.b.exp for the current cpu, on which
> sync_sched_exp_online_cleanup() is running. This works for the
> case where incoming CPU is same as self. However, for the case
> where incoming CPU is different from self, expedited request
> won't get marked, which can potentially delay reporting of
> expedited quiescent state for the incoming CPU.
> 
> Fixes: e015a3411220 ("rcu: Avoid self-IPI in sync_sched_exp_online_cleanup()")
> Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>

Good catch!!!  I have queued this for further review and testing, thank
you!

							Thanx, Paul

> ---
>  kernel/rcu/tree_exp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
> index d9e4f8e..f3947c4 100644
> --- a/kernel/rcu/tree_exp.h
> +++ b/kernel/rcu/tree_exp.h
> @@ -759,7 +759,7 @@ static void sync_sched_exp_online_cleanup(int cpu)
>  	my_cpu = get_cpu();
>  	/* Quiescent state either not needed or already requested, leave. */
>  	if (!(READ_ONCE(rnp->expmask) & rdp->grpmask) ||
> -	    __this_cpu_read(rcu_data.cpu_no_qs.b.exp)) {
> +	    rdp->cpu_no_qs.b.exp) {
>  		put_cpu();
>  		return;
>  	}
> -- 
> 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:[~2021-08-18 15:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18  8:04 Neeraj Upadhyay
2021-08-18 15:51 ` 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=20210818155151.GV4126399@paulmck-ThinkPad-P17-Gen-1 \
    --to=paulmck@kernel.org \
    --cc=boqun.feng@gmail.com \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=neeraju@codeaurora.org \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=urezki@gmail.com \
    /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

all inboxes | Powered by JetHome®