Re: [RFC] iov_iter support for a single kernel address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 13, 2021 at 03:30:41AM +0000, Matthew Wilcox wrote:
> 
> When working on the vmcore conversion to iov_iter, I noticed we had a
> lot of places that construct a single kvec on the stack, and it seems a
> little wasteful.  Adding an ITER_KADDR type makes the iov_iter a little
> easier to use.
> 
> I included conversion of 9p to use ITER_KADDR so you can see whether you
> think it's worth doing.

I'd rather go for

static inline void kvec_single_range(int rw, void *buf, size_t len,
				struct kvec *vec, struct iov_iter *i)
{
	kvec->iov_base = buf;
	kvec->iov_len = len;
	iov_iter_kvec(i, rw, iov, 1, len);
}

to parallel the import_single_range().  You get more bloat in already
convoluted (to put it very mildly) macros in iov_iter.c than you save
on not declaring the local struct kvec variables in the users...



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux