Re: [RFC][PATCH] pipe: Convert ring to head/tail

2019-09-17 Thread Will Deacon
Hi David, On Tue, Sep 17, 2019 at 02:51:35PM +0100, David Howells wrote: > Will Deacon wrote: > > > > + /* Barrier: head belongs to the write side, so order reading > > > + * the data after reading the head pointer. > > > + */ > > > + unsigned int head = READ_ON

Re: [RFC][PATCH] pipe: Convert ring to head/tail

2019-09-17 Thread David Howells
Will Deacon wrote: > > + /* Barrier: head belongs to the write side, so order reading > > +* the data after reading the head pointer. > > +*/ > > + unsigned int head = READ_ONCE(pipe->head); > > Hmm, I don't understand this. Since READ_ONCE() doesn't i

Re: [RFC][PATCH] pipe: Convert ring to head/tail

2019-09-15 Thread Will Deacon
Hi David, [+Peter] I have a few drive-by comments on the ordering side of things. See below. On Fri, Sep 13, 2019 at 02:00:39PM +0100, David Howells wrote: > Convert pipes to use head and tail pointers for the buffer ring rather than > pointer and length as the latter requires two atomic ops to u