public inbox for rcu@vger.kernel.org
 help / color / mirror / Atom feed
From: Joel Fernandes <joelagnelf@nvidia.com>
To: "Paul E . McKenney" <paulmck@kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
	Josh Triplett <josh@joshtriplett.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Uladzislau Rezki <urezki@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Zqiang <qiang.zhang@linux.dev>
Cc: rcu@vger.kernel.org, linux-kernel@vger.kernel.org,
	Joel Fernandes <joelagnelf@nvidia.com>
Subject: [PATCH v2 0/3] rcu/nocb: Few NOCB cleanup patches
Date: Fri, 26 Dec 2025 19:12:36 -0500	[thread overview]
Message-ID: <20251227001239.405644-1-joelagnelf@nvidia.com> (raw)

This series removes an unnecessary wake path (WakeOvfIsDeferred) from
the NOCB code and adds debugging warnings to detect any potential lost
wakeups.

The WakeOvfIsDeferred code path in __call_rcu_nocb_wake() attempts to
wake rcuog when the callback count exceeds qhimark and callbacks aren't
done with their GP. However, testing proves this wake is always
redundant or useless - in the flooding case, rcuog is always waiting
for a GP to finish, so waking it up is pointless.

All NOCB rcutorture scenarios pass (TREE01, TREE05, TREE08).

Changes since v1:
- Split into separate patches as suggested by Frederic
- Removed the pairing smp_mb__after_spin_lock() in
  do_nocb_deferred_wakeup_timer() as noted by Frederic.

Link to v1 (RFC):
https://lore.kernel.org/all/20251225074451.2405584-1-joelagnelf@nvidia.com/

Joel Fernandes (3):
  rcu/nocb: Remove unnecessary WakeOvfIsDeferred wake path
  rcu/nocb: Add warning if no rcuog wake up attempt happened during
    overload
  rcu/nocb: Add warning to detect if overload advancement is ever useful

 kernel/rcu/tree.c      |  2 ++
 kernel/rcu/tree.h      |  2 +-
 kernel/rcu/tree_nocb.h | 53 +++++++++++++++++++++---------------------
 3 files changed, 29 insertions(+), 28 deletions(-)

--
2.34.1

             reply	other threads:[~2025-12-27  0:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-27  0:12 Joel Fernandes [this message]
2025-12-27  0:12 ` [PATCH v2 1/3] rcu/nocb: Remove unnecessary WakeOvfIsDeferred wake path Joel Fernandes
2025-12-27  0:12 ` [PATCH v2 2/3] rcu/nocb: Add warning if no rcuog wake up attempt happened during overload Joel Fernandes
2025-12-27  0:12 ` [PATCH v2 3/3] rcu/nocb: Add warning to detect if overload advancement is ever useful Joel Fernandes

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=20251227001239.405644-1-joelagnelf@nvidia.com \
    --to=joelagnelf@nvidia.com \
    --cc=boqun.feng@gmail.com \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=qiang.zhang@linux.dev \
    --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