From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: copyless virtio net thoughts? Date: Thu, 05 Feb 2009 14:37:07 +0200 Message-ID: <498ADD73.3060906@redhat.com> References: <20090205020732.GA27684@sequoia.sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Arnd Bergmann , Herbert Xu , Rusty Russell , kvm@vger.kernel.org To: Chris Wright Return-path: Received: from mx2.redhat.com ([66.187.237.31]:40713 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173AbZBEMh1 (ORCPT ); Thu, 5 Feb 2009 07:37:27 -0500 In-Reply-To: <20090205020732.GA27684@sequoia.sous-sol.org> Sender: kvm-owner@vger.kernel.org List-ID: Chris Wright wrote: > There's been a number of different discussions re: getting copyless virtio > net (esp. for KVM). This is just a poke in that general direction to > stir the discussion. I'm interested to hear current thoughts I believe that copyless networking is absolutely essential. For transmit, copyless is needed to properly support sendfile() type workloads - http/ftp/nfs serving. These are usually high-bandwidth, cache-cold workloads where a copy is most expensive. For receive, the guest will almost always do an additional copy, but it will most likely do the copy from another cpu. Xen netchannel2 mitigates this somewhat by having the guest request the hypervisor to perform the copy when the rx interrupt is processed, but this may still be too early (the packet may be destined to a process that is on another vcpu), and the extra hypercall is expensive. In my opinion, it would be ideal to linux-aio enable taps and packet sockets. io_submit() allows submitting multiple buffers in one syscall and supports scatter/gather. io_getevents() supports dequeuing multiple packet completions in one syscall. -- error compiling committee.c: too many arguments to function