RE: RE: Some more basic questions..

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

 



>>>> 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
��.n��������+%������w��{.n�����o�^n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux