[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110314005531.GA25516@feather>
Date: Sun, 13 Mar 2011 17:55:31 -0700
From: Josh Triplett <josh@...htriplett.org>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: Joe Korty <joe.korty@...r.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Lai Jiangshan <laijs@...fujitsu.com>,
"mathieu.desnoyers@...icios.com" <mathieu.desnoyers@...icios.com>,
"dhowells@...hat.com" <dhowells@...hat.com>,
"loic.minier@...aro.org" <loic.minier@...aro.org>,
"dhaval.giani@...il.com" <dhaval.giani@...il.com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"houston.jim@...cast.net" <houston.jim@...cast.net>,
"corbet@....net" <corbet@....net>
Subject: Re: JRCU Theory of Operation
On Sun, Mar 13, 2011 at 05:50:52PM -0700, Paul E. McKenney wrote:
> On Sun, Mar 13, 2011 at 07:53:51PM -0400, Joe Korty wrote:
> > But, there is a hint in current behavior. It is well known
> > that many multithreaded apps don't uses barriers at all;
> > the authors had no idea what they are for. Yet such apps
> > largely work. This implies that the chip designers are
> > very aggressive in doing implied memory barriers wherever
> > possible, and they are very aggressive in pushing out
> > stores to caches very quickly even when memory barriers,
> > implied or not, are not present.
>
> Ahem. Or that many barrier-omission failures have a low probability
> of occurring. One case in point is a bug in RCU a few years back,
> where ten-hour rcutorture runs produced only a handful of errors (see
> http://paulmck.livejournal.com/14639.html). Other cases are turned up by
> Peter Sewell's work, which tests code sequences with and without memory
> barriers (http://www.cl.cam.ac.uk/~pes20/). In many cases, broken code
> sequences have failure rates in the parts per billion.
And for that matter, locking primitives tend to necessarily imply
barriers (what good does a lock do if the memory accesses can leak out
of it), and the vast majority of multithreaded code uses locking. So,
most multithreaded apps implictly get all the barriers they require.
- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists