Re: [RFC net-next v3 05/29] net: bvec specific path in zerocopy_sg_from_iter

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

 



On 6/28/22 23:52, David Ahern wrote:
On Tue, Jun 28, 2022 at 07:56:27PM +0100, Pavel Begunkov wrote:
Add an bvec specialised and optimised path in zerocopy_sg_from_iter.
It'll be used later for {get,put}_page() optimisations.

Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx>
---
  net/core/datagram.c | 47 +++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 47 insertions(+)


Rather than propagating iter functions, I have been using the attached
patch for a few months now. It leverages your ubuf_info in msghdr to
allow in kernel users to pass in their own iter handler.

If the series is going to be picked up for 5.20, how about we delay
this one for 5.21? I'll have time to think about it (maybe moving
the skb managed flag setup inside?), and will anyway need to send
some omitted patches then.

I was also entertaining the idea of having a smaller ubuf_info to
fit it into io_kiocb, which is tight on space.

struct ubuf_info {
	void *callback;
	refcount_t refcnt;
	u32 flags;
};

struct ubuf_info_msgzerocopy {
	struct ubuf_info ubuf;
	/* others fields */
};

48 bytes would be taking too much, but 16 looks nice. It might
make sense to move the callback into struct msghdr, I don't know.

--
Pavel Begunkov



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux