Messages in this thread | | | Subject | Re: [PATCH RFC 0/4] vsock/virtio: optimizations to increase the throughput | From | Jason Wang <> | Date | Tue, 9 Apr 2019 16:36:22 +0800 |
| |
On 2019/4/8 下午5:44, Stefan Hajnoczi wrote: > On Mon, Apr 08, 2019 at 02:43:28PM +0800, Jason Wang wrote: >> Another thing that may help is to implement sendpage(), which will greatly >> improve the performance. > I can't find documentation for ->sendpage(). Is the idea that you get a > struct page for the payload and can do zero-copy tx?
Yes.
> (And can userspace > still write to the page, invalidating checksums in the header?) > > Stefan
Userspace can still write to the page, but for correctness (e.g in the case of SPLICE_F_GIFT describe by vmsplice(2)), it should not do this. For vmsplice, it may hard to detect the time to reuse the page. Maybe we MSG_ZEROCOPY[1] is better.
Anyway, sendpage() could be still useful for sendfile() or splice().
Thanks
[1] https://netdevconf.org/2.1/papers/netdev.pdf
| |