[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [Qemu-devel] [virtio-dev] Re: [PATCH v2 00/16] Vhost-pci for inter-VM communication
On 05/17/2017 02:22 PM, Jason Wang wrote:
We can analyze from the whole data path - from VM1's network stack to send packets -> VM2's network stack to receive packets. The number of copies are actually the same for both.On 2017年05月17日 14:16, Jason Wang wrote:On 2017年05月16日 15:12, Wei Wang wrote:OK. It may take some time to clean up the driver code before post it out. You can firstHi: Care to post the driver codes too?have a check of the draft at the repo here: https://github.com/wei-w-wang/vhost-pci-driver Best, WeiInteresting, looks like there's one copy on tx side. We used to have zerocopy support for tun for VM2VM traffic. Could you please try to compare it with your vhost-pci-net by:
vhost-pci: 1-copy happen in VM1's driver xmit(), which copes packets from its network stack to VM2's RX ring buffer. (we call it "zerocopy" because there is no intermediate copy between VMs) zerocopy enabled vhost-net: 1-copy happen in tun's recvmsg, which copies packets from VM1's TX ring
buffer to VM2's RX ring buffer.That being said, we compared to vhost-user, instead of vhost_net, because vhost-user is the one
that is used in NFV, which we think is a major use case for vhost-pci.
- make sure zerocopy is enabled for vhost_net - comment skb_orphan_frags() in tun_net_xmit() ThanksYou can even enable tx batching for tun by ethtool -C tap0 rx-frames N. This will greatly improve the performance according to my test.
Thanks, but would this hurt latency? Best, Wei