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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d3177337-51cd-4841-ba4b-8e0f8f5bbc84@paulmck-laptop>
Date: Tue, 7 May 2024 10:14:08 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: Valentin Schneider <vschneid@...hat.com>, rcu@...r.kernel.org,
	linux-kernel@...r.kernel.org, Peter Zijlstra <peterz@...radead.org>,
	Neeraj Upadhyay <quic_neeraju@...cinc.com>,
	Joel Fernandes <joel@...lfernandes.org>,
	Josh Triplett <josh@...htriplett.org>,
	Boqun Feng <boqun.feng@...il.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Lai Jiangshan <jiangshanlai@...il.com>,
	Zqiang <qiang.zhang1211@...il.com>
Subject: Re: [PATCH v2 18/27] rcu: Rename rcu_dynticks_in_eqs_since() into
 rcu_watching_changed_since()

On Tue, May 07, 2024 at 03:48:18PM +0200, Frederic Weisbecker wrote:
> Le Tue, Apr 30, 2024 at 11:17:22AM +0200, Valentin Schneider a écrit :
> > The context_tracking.state RCU_DYNTICKS subvariable has been renamed to
> > RCU_WATCHING, the dynticks prefix can go.
> > 
> > Furthermore, the "in_eqs_since" part confuses me, as IIUC this only checks
> > for a change in watching/eqs state, not that RCU transitionned *into* a
> > EQS after the snapshot was taken.
> > 
> > e.g. if
> >   snap = 0b1000 (EQS)
> > and the following rcu_watching_snap(CPU) is:
> > 	 0b1100 (watching)
> > then
> >   rcu_watching_in_eqs_since(rdp, snap) -> true
> > 
> > but because RCU was already in EQS at the time of the
> > snap - it hasn't entered EQS "since" the snap was taken.
> > 
> > Update the name to reflect that we're only looking at watching/EQS
> > transitions, not specifically transitions into EQS.
> 
> Indeed in practice the function only checks a change. But semantically it really
> checks a trip to eqs because this function is only ever called after a failing
> call to rcu_dynticks_in_eqs().
> 
> So not sure about that one rename. Paul?

As you say, Valentin is technically correct.  Me, I am having a hard
time getting too excited one way or the other.  ;-)

I suggest thinking in terms of rate-bounding the change.  If you do
change it, don't change it again for a few years.

Either way, should comments be changed or added?

Of course, the scientific way to evaluate this is to whose a couple
dozen people the old code and a couple dozen other people the new code,
and see if one group or the other has statistically significantly lower
levels of confusion.  I don't see how this is feasible, but it is the
(painfully) correct way.  On the other hand, it would have the beneficial
side effect of getting more people exposed to Linux-kernel-RCU internals.
Unfortunately, it might also have the additional side effect of making
them (more) annoyed at RCU.  ;-)

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ