lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3242b1cf-728e-4c75-bcb4-3f0619388458@nvidia.com>
Date: Fri, 23 Jan 2026 20:11:09 -0500
From: Joel Fernandes <joelagnelf@...dia.com>
To: paulmck@...nel.org
Cc: linux-kernel@...r.kernel.org, Boqun Feng <boqun.feng@...il.com>,
 rcu@...r.kernel.org, Frederic Weisbecker <frederic@...nel.org>,
 Neeraj Upadhyay <neeraj.upadhyay@...nel.org>,
 Josh Triplett <josh@...htriplett.org>, Uladzislau Rezki <urezki@...il.com>,
 Steven Rostedt <rostedt@...dmis.org>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Lai Jiangshan <jiangshanlai@...il.com>, Zqiang <qiang.zhang@...ux.dev>
Subject: Re: [PATCH -next v3 2/3] rcu/nocb: Remove dead callback overload
 handling



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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ