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: <20190512004131.GE3923@linux.ibm.com>
Date:   Sat, 11 May 2019 17:41:31 -0700
From:   "Paul E. McKenney" <paulmck@...ux.ibm.com>
To:     Andrea Parri <andrea.parri@...rulasolutions.com>
Cc:     Joel Fernandes <joel@...lfernandes.org>,
        linux-kernel@...r.kernel.org, rcu@...r.kernel.org,
        Josh Triplett <josh@...htriplett.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org
Subject: Re: [PATCH] doc/rcu: Correct field_count field naming in examples

On Sun, May 12, 2019 at 12:11:26AM +0200, Andrea Parri wrote:
> Hi Paul, Joel,
> 
> > > > On the other hand, would you have ideas for more modern replacement
> > > > examples?
> > > 
> > > There are 3 cases I can see in listRCU.txt:
> > >   (1) action taken outside of read_lock (can tolerate stale data), no in-place update.
> > >                 this is the best possible usage of RCU.
> > >   (2) action taken outside of read_lock, in-place updates
> > >                 this is good as long as not too many in-place updates.
> > >                 involves copying creating new list node and replacing the
> > >                 node being updated with it.
> > >   (3) cannot tolerate stale data: here a deleted or obsolete flag can be used
> > >                                   protected by a per-entry lock. reader
> > > 				  aborts if object is stale.
> > > 
> > > Any replacement example must make satisfy (3) too?
> > 
> > It would be OK to have a separate example for (3).  It would of course
> > be nicer to have one example for all three, but not all -that- important.
> > 
> > > The only example for (3) that I know of is sysvipc sempahores which you also
> > > mentioned in the paper. Looking through this code, it hasn't changed
> > > conceptually and it could be a fit for an example (ipc_valid_object() checks
> > > for whether the object is stale).
> > 
> > That is indeed the classic canonical example.  ;-)
> > 
> > > The other example could be dentry look up which uses seqlocks for the
> > > RCU-walk case? But that could be too complex. This is also something I first
> > > learnt from the paper and then the excellent path-lookup.rst document in
> > > kernel sources.
> > 
> > This is a great example, but it would need serious simplification for
> > use in the Documentation/RCU directory.  Note that dcache uses it to
> > gain very limited and targeted consistency -- only a few types of updates
> > acquire the write-side of that seqlock.
> > 
> > Might be quite worthwhile to have a simplified example, though!
> > Perhaps a trivial hash table where write-side sequence lock is acquired
> > only when moving an element from one chain to another?
> 
> Sorry to take you down here..., but what do you mean by "the paper"?  ;-/

One or both of these two:

http://www2.rdrop.com/~paulmck/techreports/survey.2012.09.17a.pdf
http://www2.rdrop.com/~paulmck/techreports/RCUUsage.2013.02.24a.pdf

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ