[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a357144524ec4cdfa6c991a473daffdf@AcuMS.aculab.com>
Date: Fri, 18 Aug 2023 12:41:21 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Matthew Wilcox' <willy@...radead.org>
CC: 'David Howells' <dhowells@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Al Viro <viro@...iv.linux.org.uk>,
"Jens Axboe" <axboe@...nel.dk>, Christoph Hellwig <hch@...t.de>,
Christian Brauner <christian@...uner.io>,
Jeff Layton <jlayton@...nel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3 2/2] iov_iter: Don't deal with iter->copy_mc in
memcpy_from_iter_mc()
From: Matthew Wilcox
> Sent: Friday, August 18, 2023 1:27 PM
>
> On Fri, Aug 18, 2023 at 12:16:23PM +0000, David Laight wrote:
> > > > + ITER_IOVEC = 1,
> > > > + ITER_UBUF = 2,
> > > > + ITER_KVEC = 4,
> > > > + ITER_BVEC = 8,
> > > > + ITER_XARRAY = 16,
> > > > + ITER_DISCARD = 32,
> >
> > IIRC Linus had type:6 - that doesn't leave any headroom
> > for additional types (even though they shouldn't proliferate).
>
> I have proposed an ITER_KBUF in the past (it is to KVEC as UBUF is
> to IOVEC). I didn't care enough to keep pushing it, but it's clearly
> a common idiom.
Indeed, I didn't spot UBUF going in - I spot a lot of stuff.
I did wonder if you could optimise for a vector length of 1
(inside the KVEC conditional).
That would also pick up the cases where there only happens
to be a single buffer.
I also remember writing a patch that simplified import_iovec()
by combining the iov_iter with a struct iovec iovec[UIO_FASTIOV].
All got bogged down in io_uring which would need changing first.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists