On Mon, Jul 07, 2014 at 03:24:21PM -0700, Paul E. McKenney wrote: > From: "Paul E. McKenney" <[email protected]> > > It is possible to pair acquire and release barriers with other barriers, > so this commit adds them to the list in the SMP barrier pairing section. > > Reported-by: Lai Jiangshan <[email protected]> > Signed-off-by: Paul E. McKenney <[email protected]> > Reviewed-by: Tejun Heo <[email protected]>
> +A write barrier should always be paired with a data dependency barrier, > +acquire barrier, release barrier, or read barrier, though a general > +barrier would also be viable. Similarly a read barrier or a data > +dependency barrier should always be paired with at least a write barrier, > +an acquire barrier, or a release barrier, though, again, a general > +barrier is viable: When I first read the Changelog I though you were going to add things like: An acquire barrier should be paired with a release barrier, however .... barrier is also viable. A release barrier should be paired with an acquire barrier,... etc. Now the above does seem to imply such rules but it isn't explicit in them, since it only lists the requirements for read/write. Now since the entire thing is indeed symmetric the implications are fairly strong, still. Also, it might be good to have a section on the ramifications of pairing acquire/release with other than themselves, I have the feeling there's subtle things there.
pgpFFy8zUsd0l.pgp
Description: PGP signature

