public inbox for rcu@vger.kernel.org
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: linux-kernel@vger.kernel.org, rcu@vger.kernel.org
Cc: Frederic Weisbecker <frederic@kernel.org>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	Neeraj Upadhyay <neeraj.iitr10@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang1211@gmail.com>
Subject: [PATCH 1/8] rcu/exp: Remove full barrier upon main thread wakeup
Date: Mon, 29 Jan 2024 15:23:39 -0800	[thread overview]
Message-ID: <20240129232349.3170819-2-boqun.feng@gmail.com> (raw)
In-Reply-To: <20240129232349.3170819-1-boqun.feng@gmail.com>

From: Frederic Weisbecker <frederic@kernel.org>

When an expedited grace period is ending, care must be taken so that all
the quiescent states propagated up to the root are correctly ordered
against the wake up of the main expedited grace period workqueue.

This ordering is already carried through the root rnp locking augmented
by an smp_mb__after_unlock_lock() barrier.

Therefore the explicit smp_mb() placed before the wake up is not needed
and can be removed.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 kernel/rcu/tree_exp.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index 2ac440bc7e10..014ddf672165 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -198,10 +198,9 @@ static void __rcu_report_exp_rnp(struct rcu_node *rnp,
 		}
 		if (rnp->parent == NULL) {
 			raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
-			if (wake) {
-				smp_mb(); /* EGP done before wake_up(). */
+			if (wake)
 				swake_up_one_online(&rcu_state.expedited_wq);
-			}
+
 			break;
 		}
 		mask = rnp->grpmask;
-- 
2.43.0


  reply	other threads:[~2024-01-29 23:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 23:23 [PATCH 0/8] RCU exp updates for v6.9 Boqun Feng
2024-01-29 23:23 ` Boqun Feng [this message]
2024-01-30 15:47   ` [PATCH 1/8] rcu/exp: Remove full barrier upon main thread wakeup Frederic Weisbecker
2024-01-30 15:48     ` Frederic Weisbecker
2024-01-30 18:42       ` Boqun Feng
2024-01-29 23:23 ` [PATCH 2/8] rcu/exp: Fix RCU expedited parallel grace period kworker allocation failure recovery Boqun Feng
2024-01-29 23:23 ` [PATCH 3/8] rcu/exp: Handle RCU expedited grace period kworker allocation failure Boqun Feng
2024-01-29 23:23 ` [PATCH 4/8] rcu: s/boost_kthread_mutex/kthread_mutex Boqun Feng
2024-01-29 23:23 ` [PATCH 5/8] rcu/exp: Move expedited kthread worker creation functions above rcutree_prepare_cpu() Boqun Feng
2024-01-29 23:23 ` [PATCH 6/8] rcu/exp: Make parallel exp gp kworker per rcu node Boqun Feng
2024-01-29 23:23 ` [PATCH 7/8] rcu/exp: Handle parallel exp gp kworkers affinity Boqun Feng
2024-01-29 23:23 ` [PATCH 8/8] rcu/exp: Remove rcu_par_gp_wq Boqun Feng

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=20240129232349.3170819-2-boqun.feng@gmail.com \
    --to=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=neeraj.iitr10@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=qiang.zhang1211@gmail.com \
    --cc=rcu@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox