Re: [PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED

2020-12-13 Thread Pavel Begunkov
On 09/12/2020 18:24, Matthew Wilcox wrote: > On Wed, Dec 09, 2020 at 05:55:53PM +, Christoph Hellwig wrote: >> On Wed, Dec 09, 2020 at 01:37:05PM +, Pavel Begunkov wrote: >>> Yeah, I had troubles to put comments around, and it's still open. >>> >>> For current cases it can be bound to kiocb

Re: [PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED

2020-12-09 Thread Matthew Wilcox
On Wed, Dec 09, 2020 at 05:55:53PM +, Christoph Hellwig wrote: > On Wed, Dec 09, 2020 at 01:37:05PM +, Pavel Begunkov wrote: > > Yeah, I had troubles to put comments around, and it's still open. > > > > For current cases it can be bound to kiocb, e.g. "if an bvec iter passed > > "together"

Re: [PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED

2020-12-09 Thread Christoph Hellwig
On Wed, Dec 09, 2020 at 01:37:05PM +, Pavel Begunkov wrote: > Yeah, I had troubles to put comments around, and it's still open. > > For current cases it can be bound to kiocb, e.g. "if an bvec iter passed > "together" with kiocb then the vector should stay intact up to > ->ki_complete()". But

Re: [PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED

2020-12-09 Thread Pavel Begunkov
On 09/12/2020 13:07, Al Viro wrote: > On Wed, Dec 09, 2020 at 08:36:45AM +, Christoph Hellwig wrote: >> >> This is making the iter type even more of a mess than it already is. >> I think we at least need placeholders for 0/1 here and an explicit >> flags namespace, preferably after the types. >

Re: [PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED

2020-12-09 Thread Al Viro
On Wed, Dec 09, 2020 at 08:36:45AM +, Christoph Hellwig wrote: > > This is making the iter type even more of a mess than it already is. > I think we at least need placeholders for 0/1 here and an explicit > flags namespace, preferably after the types. > > Then again I'd much prefer if we didn

Re: [PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED

2020-12-09 Thread Pavel Begunkov
On 09/12/2020 09:06, Christoph Hellwig wrote: > On Wed, Dec 09, 2020 at 08:36:45AM +, Christoph Hellwig wrote: >> This is making the iter type even more of a mess than it already is. >> I think we at least need placeholders for 0/1 here and an explicit >> flags namespace, preferably after the t

Re: [PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED

2020-12-09 Thread Christoph Hellwig
On Wed, Dec 09, 2020 at 08:36:45AM +, Christoph Hellwig wrote: > This is making the iter type even more of a mess than it already is. > I think we at least need placeholders for 0/1 here and an explicit > flags namespace, preferably after the types. > > Then again I'd much prefer if we didn't

Re: [PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED

2020-12-09 Thread Christoph Hellwig
Ok, seems like the patches made it to the lists, while oyu only send the cover letter to my address which is very strange. > diff --git a/include/linux/uio.h b/include/linux/uio.h > index 72d88566694e..af626eb970cf 100644 > --- a/include/linux/uio.h > +++ b/include/linux/uio.h > @@ -18,6 +18,8 @@

[PATCH 1/2] iov: introduce ITER_BVEC_FLAG_FIXED

2020-12-08 Thread Pavel Begunkov
Add ITER_BVEC_FLAG_FIXED iov iter flag, which will allow us to reuse passed in bvec instead of copying it. In particular it means that iter->bvec won't be freed and page references are taken remain so until callees don't need them, including asynchronous execution. Signed-off-by: Pavel Begunkov -