From: "Paul E. McKenney" <paulmck@kernel.org>
To: Joel Fernandes <joelagnelf@nvidia.com>
Cc: linux-kernel@vger.kernel.org, Boqun Feng <boqun.feng@gmail.com>,
rcu@vger.kernel.org, Frederic Weisbecker <frederic@kernel.org>,
Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
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>
Subject: Re: [PATCH -next v3 2/3] rcu/nocb: Remove dead callback overload handling
Date: Thu, 22 Jan 2026 21:41:31 -0800 [thread overview]
Message-ID: <ec825c7c-01eb-4348-a3a6-e464c51ad22e@paulmck-laptop> (raw)
In-Reply-To: <20260119231223.989409-3-joelagnelf@nvidia.com>
On Mon, Jan 19, 2026 at 06:12:22PM -0500, Joel Fernandes wrote:
> During callback overload (exceeding qhimark), the NOCB code attempts
> opportunistic advancement via rcu_advance_cbs_nowake(). Analysis shows
> this entire code path is dead:
>
> - 30 overload conditions triggered with 300,000 callback flood
> - 0 advancements actually occurred
> - 100% of time blocked because current GP not done
>
> The overload condition triggers when callbacks are coming in at a high
> rate with GPs not completing as fast. But the advancement requires the
> GP to be complete - a logical contradiction. Even if the GP did complete
> in time, nocb_gp_wait() has to wake up anyway to do the advancement, so
> it is pointless.
>
> Since the advancement is dead code, the entire overload handling block
> serves no purpose. Remove it entirely.
>
> Suggested-by: Frederic Weisbecker <frederic@kernel.org>
> Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
> ---
> kernel/rcu/tree_nocb.h | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
> index f525e4f7985b..64a8ff350f92 100644
> --- a/kernel/rcu/tree_nocb.h
> +++ b/kernel/rcu/tree_nocb.h
> @@ -526,8 +526,6 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
> __releases(rdp->nocb_lock)
> {
> long bypass_len;
> - unsigned long cur_gp_seq;
> - unsigned long j;
> long lazy_len;
> long len;
> struct task_struct *t;
> @@ -562,16 +560,6 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
> }
>
> return;
> - } else if (len > rdp->qlen_last_fqs_check + qhimark) {
> - /* ... or if many callbacks queued. */
> - rdp->qlen_last_fqs_check = len;
> - j = jiffies;
> - if (j != rdp->nocb_gp_adv_time &&
> - rcu_segcblist_nextgp(&rdp->cblist, &cur_gp_seq) &&
> - rcu_seq_done(&rdp->mynode->gp_seq, cur_gp_seq)) {
> - rcu_advance_cbs_nowake(rdp->mynode, rdp);
> - rdp->nocb_gp_adv_time = j;
> - }
> }
>
> rcu_nocb_unlock(rdp);
> --
> 2.34.1
>
next prev parent reply other threads:[~2026-01-23 5:41 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 23:12 [PATCH -next v3 0/3] rcu/nocb: Cleanup patches for next merge window Joel Fernandes
2026-01-19 23:12 ` [PATCH -next v3 1/3] rcu/nocb: Remove unnecessary WakeOvfIsDeferred wake path Joel Fernandes
2026-01-22 21:56 ` Paul E. McKenney
2026-01-19 23:12 ` [PATCH -next v3 2/3] rcu/nocb: Remove dead callback overload handling Joel Fernandes
2026-01-19 23:53 ` Frederic Weisbecker
2026-01-20 0:07 ` Paul E. McKenney
2026-01-20 0:59 ` joelagnelf
2026-01-22 21:55 ` Paul E. McKenney
2026-01-22 23:43 ` Joel Fernandes
2026-01-23 0:12 ` Paul E. McKenney
2026-01-23 5:41 ` Paul E. McKenney [this message]
2026-01-19 23:12 ` [PATCH -next v3 3/3] rcu/nocb: Extract nocb_defer_wakeup_cancel() helper Joel Fernandes
2026-01-22 21:59 ` Paul E. McKenney
2026-01-21 19:09 ` [PATCH -next v3 0/3] rcu/nocb: Cleanup patches for next merge window Paul E. McKenney
2026-01-21 19:13 ` Joel Fernandes
2026-01-21 19:41 ` Paul E. McKenney
2026-01-21 19:50 ` Joel Fernandes
2026-01-21 19:58 ` Paul E. McKenney
[not found] <EBEF016B-721C-4A54-98E3-4B8BE6AA4C21@nvidia.com>
2026-01-23 1:29 ` [PATCH -next v3 2/3] rcu/nocb: Remove dead callback overload handling Joel Fernandes
2026-01-23 5:46 ` Paul E. McKenney
2026-01-23 15:30 ` Joel Fernandes
2026-01-23 16:49 ` Paul E. McKenney
2026-01-23 19:36 ` Joel Fernandes
2026-01-23 21:27 ` Paul E. McKenney
2026-01-24 1:11 ` Joel Fernandes
2026-01-25 14:46 ` 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=ec825c7c-01eb-4348-a3a6-e464c51ad22e@paulmck-laptop \
--to=paulmck@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=joelagnelf@nvidia.com \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=neeraj.upadhyay@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
all inboxes | Powered by JetHome®