From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 5/6] kvm: qemu: virtio-net: handle all tx in I/O thread without timer Date: Thu, 06 Nov 2008 19:43:10 +0200 Message-ID: <49132CAE.10102@redhat.com> References: <> <1225389113-28332-1-git-send-email-markmc@redhat.com> <1225389113-28332-2-git-send-email-markmc@redhat.com> <1225389113-28332-3-git-send-email-markmc@redhat.com> <1225389113-28332-4-git-send-email-markmc@redhat.com> <1225389113-28332-5-git-send-email-markmc@redhat.com> <1225389113-28332-6-git-send-email-markmc@redhat.com> <491068ED.3020902@cisco.com> <1225990976.10879.34.camel@blaa> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "David S. Ahern" , Avi Kivity , kvm@vger.kernel.org To: Mark McLoughlin Return-path: Received: from mx2.redhat.com ([66.187.237.31]:37627 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752682AbYKFRnP (ORCPT ); Thu, 6 Nov 2008 12:43:15 -0500 In-Reply-To: <1225990976.10879.34.camel@blaa> Sender: kvm-owner@vger.kernel.org List-ID: Mark McLoughlin wrote: > My machine has four CPUs, with two 6Mb L2 caches - each cache is shared > between two of the CPUs, so I set things up as follows: > > pcpu#3 - netserver, I/O thread, vcpu#0 > pcup#4 - vcpu#1, virtio_net irq, netperf > > which (hopefully) ensures that we're only doing one copy using RAM and > the rest are using the L1/L2 caches. > This pinning can drastically alter the results in other ways. If the vcpu doing the transmit and the iothread can run in parallel, each guest->host kick will result in a vmexit, IPI, and iothread execution, with much less blocking of interrupts. When the iothread and vcpu are collocated, the scheduler will ensure natural batching and you will only vmexit when the ring is full (or empty, in the case of the iothread), or if you spent quite a long time processing it. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.