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]
Date:   Wed, 7 Mar 2018 07:54:44 -0800
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     "Eric W. Biederman" <ebiederm@...ssion.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Tejun Heo <tj@...nel.org>, Jann Horn <jannh@...gle.com>,
        Benjamin LaHaise <bcrl@...ck.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        linux-kernel@...r.kernel.org
Subject: Re: Simplifying our RCU models

On Tue, Mar 06, 2018 at 12:39:06PM -0800, Paul E. McKenney wrote:
> On Tue, Mar 06, 2018 at 09:47:38AM +0100, Ingo Molnar wrote:
> > 
> > * Paul E. McKenney <paulmck@...ux.vnet.ibm.com> wrote:
> > 
> > > > > But if we look at the bigger API picture:
> > > > >
> > > > >                           !PREEMPT_RCU  PREEMPT_RCU=y
> > > > >   rcu_read_lock():        atomic        preemptible
> > > > >   rcu_read_lock_sched():  atomic        atomic
> > > > >   srcu_read_lock():       preemptible   preemptible
> > > > >
> > > > > Then we could maintain full read side API flexibility by making PREEMPT_RCU=y the 
> > > > > only model, merging it with SRCU and using these main read side APIs:
> > > > >
> > > > >   rcu_read_lock_preempt_disable():	atomic
> > > > >   rcu_read_lock():			preemptible
> > > 
> > > One issue with merging SRCU into rcu_read_lock() is the general blocking within 
> > > SRCU readers.  Once merged in, these guys block everyone.  We should focus 
> > > initially on the non-SRCU variants.
> > > 
> > > On the other hand, Linus's suggestion of merging rcu_read_lock_sched()
> > > into rcu_read_lock() just might be feasible.  If that really does pan
> > > out, we end up with the following:
> > > 
> > >				!PREEMPT	PREEMPT=y
> > >	rcu_read_lock():	atomic		preemptible
> > >	srcu_read_lock():	preemptible	preemptible
> > > 
> > > In this model, rcu_read_lock_sched() maps to preempt_disable() and (as
> > > you say above) rcu_read_lock_bh() maps to local_bh_disable().  The way
> > > this works is that in PREEMPT=y kernels, synchronize_rcu() waits not
> > > only for RCU read-side critical sections, but also for regions of code
> > > with preemption disabled.  The main caveat seems to be that there be an
> > > assumed point of preemptibility between each interrupt and each softirq
> > > handler, which should be OK.
> > > 
> > > There will be some adjustments required for lockdep-RCU, but that should
> > > be reasonably straightforward.
> > > 
> > > Seem reasonable?
> > 
> > Yes, that approach sounds very reasonable to me: it is similar to what we do on 
> > the locking side as well, where we have 'atomic' variants (spinlocks/rwlocks) and 
> > 'sleeping' variants (mutexes, rwsems, etc.).
> > 
> > ( This means there will be more automatic coupling between BH and preempt critical
> >   sections and RCU models not captured via explicit RCU-namespace APIs, but that
> >   should be OK I think. )
> 
> Thus far, I have been unable to prove that it cannot work, which is about
> as good as it gets at this stage.  So here is hoping!  ;-)
> 
> I will look at your later corrected message, but will gratefully accept
> your offer of help with the naming transition.

Ah, and any thoughts on how best to get feedback from the various people
who would need to reprogram their fingers?  Or is everyone already on
board with changing these various names?

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ