Hello Just a bump to see if anyone can help:) MW On Tue, Jun 3, 2014 at 6:08 PM, Marcus White <roastedseaweed.k@xxxxxxxxx> wrote: > Cant the pages be locked down by the host when it gets the call down > for an operation with a buffer(like if a usual user mode process > case), and once locked down in the host kernel, the physical address > be used directly for DMA, whether send or recieve? Not sure if I fully > understand why a copy will be done irrespective. Can you please > clarify? > > Also in the QEMU case, since they are all part of the same process (VM > and QEMU), where is the data copy? > > Apologies if these are basic questions, trying to understand the path here. > > Thanks in advance. > MW > > > > On Tue, Jun 3, 2014 at 4:25 AM, Venkateswara Rao Nandigam > <venkateswararao.nandigam@xxxxxxxxxx> wrote: >>>>>> I know that kvm support network tx zero-copy when using vhost, but rx copy is still performed in vhost, because the NIC cannot determine DMA to which VM's rx buffers before L2 switching(unless vhost using page-flip between HVA->HPA and GPA->HPA, or macvtap over SRIOV-VF is used). >>>>>>>Storage has no this limitation, can vhost-blk and vhost-scsi avoid data copy in both write and read? >> >> A copy in kernel will be done irrespective of Rx/Tx when vhost is used. One copy between user space and kernel space in QEMU is avoided when vhost is used. That is why using vhost is "realtively" zero copy. >> >> I don’t think that they can be classified as vhost-blk or vhost-scsi. Vhost is an add on to an existing Guest driver, like virtio. So they can be called virtio-blk, virtio-scsi >> >> So, using PV drivers(virtio-blk) for disk access makes accesses faster and using vhost on top of this will make it much more faster as one copy will be avoided. >> >> Linus AIO will facilitate avoiding blocking on a i/o, but doubt if it has anything to do with copy across user space and kernel space. >> >> -----Original Message----- >> From: kvm-owner@xxxxxxxxxxxxxxx [mailto:kvm-owner@xxxxxxxxxxxxxxx] On Behalf Of Zhang Haoyu >> Sent: Tuesday, June 03, 2014 4:30 PM >> To: Venkateswara Rao Nandigam; Marcus White >> Cc: kvm >> Subject: Re: RE: Some more basic questions.. >> >>>>A few additional questions:) >>>> >>>>1. If IO to a block device goes through QEMU and not vhost, are there >>>>data copies between kernel and user mode if I do IO to a block device >>>>or is it zero copy? Kind of related to Question (2) also. >>>> >>>An additional copy will be avoided only by using vhost, so if you are using vhost you can call it zero copy realtively. >> I know that kvm support network tx zero-copy when using vhost, but rx copy is still performed in vhost, because the NIC cannot determine DMA to which VM's rx buffers before L2 switching(unless vhost using page-flip between HVA->HPA and GPA->HPA, or macvtap over SRIOV-VF is used). >> Storage has no this limitation, can vhost-blk and vhost-scsi avoid data copy in both write and read? >> >> IIUC, even if vhost is not used, qemu using linux native aio can avoid data copy between user and kernel space, right? >> >> -- >> To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html