From: Joel Fernandes <joelagnelf@nvidia.com>
To: paulmck@kernel.org
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: Fri, 23 Jan 2026 20:11:09 -0500 [thread overview]
Message-ID: <3242b1cf-728e-4c75-bcb4-3f0619388458@nvidia.com> (raw)
In-Reply-To: <816a14e0-c06e-496a-9c84-512c76d98157@paulmck-laptop>
On 1/23/2026 4:27 PM, Paul E. McKenney wrote:
> On Fri, Jan 23, 2026 at 02:36:37PM -0500, Joel Fernandes wrote:
>> On 1/23/2026 11:49 AM, Paul E. McKenney wrote:
>>> We could have one CPU flooding and the rest idle, and many other
>>> combinations. And, if I recall correctly, polling can burn extra CPU
>>> and cause extra wakeups even when the system is fully idle. Or has
>>> that changed?
>>
>> In my experience working on lazy RCU, if you have such a kind of overload on
>> any CPU, then you're usually not saving any power anyway. The system has to
>> be really quiet and idle with a low stream of callbacks for you to save
>> power. Further, when the callback length increases too much, we don't turn
>> on lazy RCU anyway because the idea is that we are overloaded and the
>> system is busy - so we already have such assumptions baked in. I think a
>> similar argument could apply here for dynamically enabling polling mode only
>> when overloaded.
>
> The concern is detecting overload quickly. Any unnecessary gaps in
> invoking RCU callbacks cannot be made up. That time is gone.
> And the polling does sleeps...
Right, the time is gone, but perhaps the recent past is an indication
that the gears of the machinery need to move faster, possibly to improve
things. :-D. Obviously, it's also totally possible that entering polling
mode doesn't benefit anything if RCU readers are taking forever to exit
their critical sections and so forth.
>
>> I was coming more from the point of view of improving grace period performance
>> when we do have an overload, potentially resolving the overloaded situation
>> faster than usual. We would dynamically trigger polling based on such
>> circumstances.
>>
>> That said, I confess I don't have extensive experience with polling mode beyond
>> testing. I believe we should add more rcutorture test cases for this. I'm
>> considering adding a new config that enables polling for NOCB - this testing is
>> what revealed the potential for grace period performance improvement with NOCB
>> to me.
>
> The main purpose of polling was to make call_rcu() avoid at least some
> of its slowpaths. If we are getting some other benefit out of it, is
> polling the best way to achieve that benefit?
Thanks for the clarification. I will study what exactly is the behavior
first. The main benefit I see is that Grace Periods progress more
quickly in polling mode. My suspicion is perhaps this is because of the
speed of wakeups happening due to timer interrupts vs. those happening
because of one thread waking another. I am just speculating, and I will
study it more before being able to say anything meaningful here. ;-).
But thanks for the discussion!
--
Joel Fernandes
next prev parent reply other threads:[~2026-01-24 1:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2026-01-25 14:46 ` Joel Fernandes
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 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
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=3242b1cf-728e-4c75-bcb4-3f0619388458@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