[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <919f17a3-2199-4c97-a1f8-5434098eb509@nvidia.com>
Date: Thu, 27 Mar 2025 22:31:41 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: paulmck@...nel.org
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Frederic Weisbecker <frederic@...nel.org>,
Neeraj Upadhyay <neeraj.upadhyay@...nel.org>,
Joel Fernandes <joel@...lfernandes.org>,
Josh Triplett <josh@...htriplett.org>, Boqun Feng <boqun.feng@...il.com>,
Uladzislau Rezki <urezki@...il.com>, Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>, Zqiang <qiang.zhang1211@...il.com>,
"rcu@...r.kernel.org" <rcu@...r.kernel.org>
Subject: Re: [PATCH 1/3] rcu: Replace magic number with meaningful constant in
rcu_seq_done_exact()
On 3/27/2025 1:09 PM, Paul E. McKenney wrote:
>>> In contrast, making the guard band a bit longer than it needs to be
>>> has little or no downside.
>> Making it 3 GP instead of 2 should be ok with me as long as we document it but at least it will not be a magic number based on an equation. I feel we should not put random magic numbers which is more dangerous since it is hard to explain (and hence debug — just my 2 cents).
> Apologies, I was getting ahead of us on this one.
>
> That third (and maybe also a fourth) grace period becomes important if
> we start getting memory contention on rcu_state.gp_seq, in which case
> we would want the polled grace periods to look at the leaf rcu_node
> structure's gp_seq, which would introduce extra slop.
Makes sense.
> For now, for this patch, assuming you guys promise to remember this
> should such memory contention prove problematic:
>
> Reviewed-by: Paul E. McKenney <paulmck@...nel.org>
Thanks! Will add the tag.
- Joel
Powered by blists - more mailing lists