mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: "Zhang, Qiang1" <qiang1.zhang@intel.com>,
	"quic_neeraju@quicinc.com" <quic_neeraju@quicinc.com>,
	"joel@joelfernandes.org" <joel@joelfernandes.org>,
	"rcu@vger.kernel.org" <rcu@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rcu: Remove duplicate settings for rcu boost kthreads affinity
Date: Thu, 12 Jan 2023 16:07:07 +0100	[thread overview]
Message-ID: <Y8AiGy6iYiUk7iB+@lothringen> (raw)
In-Reply-To: <20221221192622.GD4001@paulmck-ThinkPad-P17-Gen-1>

On Wed, Dec 21, 2022 at 11:26:22AM -0800, Paul E. McKenney wrote:
> On Sat, Dec 17, 2022 at 01:02:03PM +0000, Zhang, Qiang1 wrote:
> commit 5815245b56229198d5f5d0c48c26d3c0c53ee222
> Author: Zqiang <qiang1.zhang@intel.com>
> Date:   Wed Dec 21 11:15:43 2022 -0800
> 
>     rcu: Remove redundant call to rcu_boost_kthread_setaffinity()
>     
>     The rcu_boost_kthread_setaffinity() function is invoked at
>     rcutree_online_cpu() and rcutree_offline_cpu() time, early in the online
>     timeline and late in the offline timeline, respectively.  It is also
>     invoked from rcutree_dead_cpu(), however, in the absence of userspace
>     manipulations (for which userspace must take responsibility), this call
>     is redundant with that from rcutree_offline_cpu().  This redundancy can
>     be demonstrated by printing out the relevant cpumasks
>     
>     This commit therefore removes the call to rcu_boost_kthread_setaffinity()
>     from rcutree_dead_cpu().
>     
>     Signed-off-by: Zqiang <qiang1.zhang@intel.com>
>     Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

Reviewed-by: Frederic Weisbecker <frederic@kernel.org>

Thanks!


> 
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index c3255d27286c4..a6181b76fd5ab 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -4165,15 +4165,10 @@ static void rcu_cleanup_dead_rnp(struct rcu_node *rnp_leaf)
>   */
>  int rcutree_dead_cpu(unsigned int cpu)
>  {
> -	struct rcu_data *rdp = per_cpu_ptr(&rcu_data, cpu);
> -	struct rcu_node *rnp = rdp->mynode;  /* Outgoing CPU's rdp & rnp. */
> -
>  	if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
>  		return 0;
>  
>  	WRITE_ONCE(rcu_state.n_online_cpus, rcu_state.n_online_cpus - 1);
> -	/* Adjust any no-longer-needed kthreads. */
> -	rcu_boost_kthread_setaffinity(rnp, -1);
>  	// Stop-machine done, so allow nohz_full to disable tick.
>  	tick_dep_clear(TICK_DEP_BIT_RCU);
>  	return 0;

  parent reply	other threads:[~2023-01-12 15:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15  9:00 Zqiang
2022-12-17  1:09 ` Paul E. McKenney
2022-12-17  2:00   ` Zhang, Qiang1
2022-12-17 13:02     ` Zhang, Qiang1
2022-12-21 19:26       ` Paul E. McKenney
2022-12-22  9:42         ` Zhang, Qiang1
2023-01-12 15:07         ` Frederic Weisbecker [this message]
2023-01-12 15:29           ` 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=Y8AiGy6iYiUk7iB+@lothringen \
    --to=frederic@kernel.org \
    --cc=joel@joelfernandes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=qiang1.zhang@intel.com \
    --cc=quic_neeraju@quicinc.com \
    --cc=rcu@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

all inboxes | Powered by JetHome®