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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210729010742.GP4397@paulmck-ThinkPad-P17-Gen-1>
Date:   Wed, 28 Jul 2021 18:07:42 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Frederic Weisbecker <frederic@...nel.org>
Cc:     Josh Triplett <josh@...htriplett.org>, rcu@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-team@...com, mingo@...nel.org,
        jiangshanlai@...il.com, akpm@...ux-foundation.org,
        mathieu.desnoyers@...icios.com, tglx@...utronix.de,
        peterz@...radead.org, rostedt@...dmis.org, dhowells@...hat.com,
        edumazet@...gle.com, fweisbec@...il.com, oleg@...hat.com,
        joel@...lfernandes.org,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH v2 rcu 04/18] rcu: Weaken ->dynticks accesses and updates

On Thu, Jul 29, 2021 at 12:23:33AM +0200, Frederic Weisbecker wrote:
> On Wed, Jul 28, 2021 at 01:47:20PM -0700, Paul E. McKenney wrote:
> > On Wed, Jul 28, 2021 at 01:37:19PM -0700, Josh Triplett wrote:
> > > On Wed, Jul 28, 2021 at 10:37:15AM -0700, Paul E. McKenney wrote:
> > > > This change makes the memory ordering requirements
> > > > more evident, and it might well also speed up the to-idle and from-idle
> > > > fastpaths on some architectures.
> > > 
> > > Cleaning up the memory ordering requirements certainly seems worthwhile.
> > > But is there any straightforward benchmark that might quantify the
> > > "might well also speed up" here? How much does weakening the memory
> > > ordering buy us, in practice?
> > 
> > None that I know of!
> 
> I know two:
> 
> 1) The whole debate makes us review again (and again) the memory ordering
>    requirements in RCU VS dynticks-idle, which can only be good to enforce
>    correctness.
> 
> 2) The more we weaken the ordering, the better we grasp and understand the
>    underlying ordering requirements. Unnecessary full memory barriers tend to
>    obfuscate our ordering expectations, making the code less self-explanatory.
> 
> 3) I have terrible ideas to remove a full barrier in the dynticks idle path
>    that should work in practice but not in theory and therefore I'm never going
>    to talk about it unless everyone in the room is drunk.

Cute!

On #3/2, I don't drink, so I guess you have to leave me out.  ;-)

The other side of this coin is that weakening ordering often decreases
robustness and increases complexity.  In unquantifiable ways, of course,
which can make discussion of the tradeoffs problematic.

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ