LKML Archive on
help / color / mirror / Atom feed
From: "Paul E. McKenney" <>
	Frederic Weisbecker <>,
	"Paul E . McKenney" <>
Subject: [PATCH rcu 2/2] rcu/nocb: Remove NOCB deferred wakeup from rcutree_dead_cpu()
Date: Wed, 21 Jul 2021 13:27:39 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20210721202716.GA2679705@paulmck-ThinkPad-P17-Gen-1>

From: Frederic Weisbecker <>

At CPU offline time, we must handle any pending wakeup for the nocb_gp
kthread linked to the outgoing CPU.

Now we are making sure of that twice:

1) From rcu_report_dead() when the outgoing CPU makes the very last
   local cleanups by itself before switching offline.

2) From rcutree_dead_cpu(). Here the offlining CPU has gone and is truly
   now offline. Another CPU takes care of post-portem cleaning up and
   check if the offline CPU had pending wakeup.

Both ways are fine but we have to choose one or the other because we
don't need to repeat that action. Simply benefit from cache locality
and keep only the first solution.

Signed-off-by: Frederic Weisbecker <>
Signed-off-by: Paul E. McKenney <>
 kernel/rcu/tree.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index b6eb480402e05..0fda98a0d12e9 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2471,9 +2471,6 @@ int rcutree_dead_cpu(unsigned int cpu)
 	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);
-	/* Do any needed no-CB deferred wakeups from this CPU. */
-	do_nocb_deferred_wakeup(per_cpu_ptr(&rcu_data, cpu));
 	// Stop-machine done, so allow nohz_full to disable tick.
 	return 0;

      parent reply	other threads:[~2021-07-21 20:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 20:27 [PATCH rcu 0/2] NOCB-CPU updates for v5.15 Paul E. McKenney
2021-07-21 20:27 ` [PATCH rcu 1/2] rcu/nocb: Start moving nocb code to its own plugin file Paul E. McKenney
2021-07-21 20:27 ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH rcu 2/2] rcu/nocb: Remove NOCB deferred wakeup from rcutree_dead_cpu()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).