RE: [RFC PATCH 08/28] siw: Inline do_tcp_sendpages()

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

 




> -----Original Message-----
> From: David Howells <dhowells@xxxxxxxxxx>
> Sent: Monday, 20 March 2023 12:09
> To: Bernard Metzler <BMT@xxxxxxxxxxxxxx>
> Cc: David Howells <dhowells@xxxxxxxxxx>; Tom Talpey <tom@xxxxxxxxxx>;
> linux-rdma@xxxxxxxxxxxxxxx
> Subject: [EXTERNAL] Re: [RFC PATCH 08/28] siw: Inline do_tcp_sendpages()
> 
> Bernard Metzler <BMT@xxxxxxxxxxxxxx> wrote:
> 
> > >  /*
> > > - * 0copy TCP transmit interface: Use do_tcp_sendpages.
> > > + * 0copy TCP transmit interface: Use MSG_SPLICE_PAGES.
> > >   *
> > >   * Using sendpage to push page by page appears to be less efficient
> > >   * than using sendmsg, even if data are copied.
> >
> > That is an interesting observation. Is efficiency to be read as
> > CPU load, or throughput on the wire, or both?
> 
> Um.  The observation in the comment is one you made, not me according to
> git

Haha, yes. So sorry for that. I am getting older ;) I need
to put on some more sanity checks before posting here!


> blame.  I merely changed "do_tcp_sendpages" to "MSG_SPLICE_PAGES" in the
> first
> line of the comment.
> 
> > Back in the days, I introduced that zcopy path for efficiency
> > reasons - getting both better throughput and less CPU load.
> > I looked at both WRITE and READ performance. Using
> > do_tcp_sendpages() is currently limited to processing work
> > which is not registered with local completion generation.
> > Replying to a remote READ request is a typical case. Did
> > you check with READ?
> 
> Ah - you're talking about ksmbd there?  I haven't tested the patch with
> that.

Did you test with both kernel ULPs and user level applications?

> 
> > > -		rv = do_tcp_sendpages(sk, page[i], offset, bytes, flags);
> > > +		rv = tcp_sendmsg_locked(sk, &msg, size);
> >
> > Would that tcp_sendmsg_locked() with a msg flagged
> > MSG_SPLICE_PAGES still have zero copy semantics?
> 
> Yes - though I am considering making it conditional on whether the pages in
> the iterator belong to the slab allocator (in which case they get copied)
> or
> not.

Sounds good to me!
> 
> David





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux