Re: perf events ring buffer memory barrier on powerpc

2013-11-02 Thread Paul E. McKenney
On Fri, Nov 01, 2013 at 03:56:34PM +0100, Peter Zijlstra wrote: > On Wed, Oct 30, 2013 at 11:40:15PM -0700, Paul E. McKenney wrote: > > > Now the whole crux of the question is if we need barrier A at all, since > > > the STORES issued by the @buf writes are dependent on the ubuf->tail > > > read. >

Re: perf events ring buffer memory barrier on powerpc

2013-11-02 Thread Paul E. McKenney
On Fri, Nov 01, 2013 at 05:18:19PM +0100, Peter Zijlstra wrote: > On Wed, Oct 30, 2013 at 11:40:15PM -0700, Paul E. McKenney wrote: > > The dependency you are talking about is via the "if" statement? > > Even C/C++11 is not required to respect control dependencies. > > > > This one is a bit annoyi

Re: perf events ring buffer memory barrier on powerpc

2013-11-02 Thread Paul E. McKenney
[ Adding David Howells, Lech Fomicki, and Mark Batty on CC for their thoughts given previous discussions. ] On Sat, Nov 02, 2013 at 09:36:18AM -0700, Paul E. McKenney wrote: > On Fri, Nov 01, 2013 at 03:12:58PM +0200, Victor Kaplansky wrote: > > "Paul E. McKenney" wrote on 10/31/2013 > > 08:16:

Re: perf events ring buffer memory barrier on powerpc

2013-11-02 Thread Paul E. McKenney
On Fri, Nov 01, 2013 at 06:06:58PM +0200, Victor Kaplansky wrote: > "Paul E. McKenney" wrote on 10/31/2013 > 05:25:43 PM: > > > I really don't care about "fair" -- I care instead about the kernel > > working reliably. > > Though I don't see how putting a memory barrier without deep understanding

Re: perf events ring buffer memory barrier on powerpc

2013-11-02 Thread Paul E. McKenney
On Fri, Nov 01, 2013 at 11:30:17AM +0100, Peter Zijlstra wrote: > On Fri, Nov 01, 2013 at 02:28:14AM -0700, Paul E. McKenney wrote: > > > This is a completely untenable position. > > > > Indeed it is! > > > > C/C++ never was intended to be used for parallel programming, > > And yet pretty much

Re: perf events ring buffer memory barrier on powerpc

2013-11-02 Thread Paul E. McKenney
On Fri, Nov 01, 2013 at 03:12:58PM +0200, Victor Kaplansky wrote: > "Paul E. McKenney" wrote on 10/31/2013 > 08:16:02 AM: > > > > BTW, it is why you also don't need ACCESS_ONCE() around @tail, but only > > > around > > > @head read. > > Just to be sure, that we are talking about the same code -

Re: perf events ring buffer memory barrier on powerpc

2013-11-02 Thread Paul E. McKenney
On Fri, Nov 01, 2013 at 04:25:42PM +0200, Victor Kaplansky wrote: > "Paul E. McKenney" wrote on 10/31/2013 > 08:40:15 AM: > > > > void ubuf_read(void) > > > { > > >u64 head, tail; > > > > > >tail = ACCESS_ONCE(ubuf->tail); > > >head = ACCESS_ONCE(ubuf->head); > > > > > >/* > > >

Re: perf events ring buffer memory barrier on powerpc

2013-11-02 Thread Paul E. McKenney
On Fri, Nov 01, 2013 at 05:11:29PM +0100, Peter Zijlstra wrote: > On Wed, Oct 30, 2013 at 11:40:15PM -0700, Paul E. McKenney wrote: > > > void kbuf_write(int sz, void *buf) > > > { > > > u64 tail = ACCESS_ONCE(ubuf->tail); /* last location userspace read */ > > > u64 offset = kbuf->head; /* we

Re: [PATCH 0/2] move of_find_next_cache_node to DT core

2013-11-02 Thread Grant Likely
On Fri, 04 Oct 2013 11:42:49 +0100, Sudeep KarkadaNagesha wrote: > Hi Grant, > > On 18/09/13 17:18, Sudeep KarkadaNagesha wrote: > > On 18/09/13 15:51, Grant Likely wrote: > >> On Wed, 18 Sep 2013 11:53:03 +0100, Sudeep KarkadaNagesha > >> wrote: > >>> From: Sudeep KarkadaNagesha > >>> > >>>