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 =

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

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

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

2019-09-13 Thread David Howells
Here's my first patch to the pipe ring, with an eye to piggybacking notifications on it. Other than whatever booting does, I haven't managed to explicitly test splice and iov_iter-to-pipe yet. Other than that, lmbench seems to show about a 1% improvement on pipe performance and my own