From: Ben-Ami Yassour Subject: Re: PCI passthrough with VT-d - native performance Date: Thu, 17 Jul 2008 09:24:51 +0300 Message-ID: <1216275891.31546.297.camel@cluwyn.haifa.ibm.com> References: <1216214225-18030-1-git-send-email-benami@il.ibm.com> <487E076D.4050306@qumranet.com> <1216221530.31546.274.camel@cluwyn.haifa.ibm.com> <487E125C.7020301@codemonkey.ws> <1216224796.31546.283.camel@cluwyn.haifa.ibm.com> <487E2863.3000803@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Anthony Liguori , amit.shah@qumranet.com, kvm@vger.kernel.org, Muli Ben-Yehuda , weidong.han@intel.com To: Avi Kivity Return-path: Received: from mtagate1.uk.ibm.com ([195.212.29.134]:17391 "EHLO mtagate1.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751338AbYGQGZE (ORCPT ); Thu, 17 Jul 2008 02:25:04 -0400 Received: from d06nrmr1407.portsmouth.uk.ibm.com (d06nrmr1407.portsmouth.uk.ibm.com [9.149.38.185]) by mtagate1.uk.ibm.com (8.13.8/8.13.8) with ESMTP id m6H6OspK032420 for ; Thu, 17 Jul 2008 06:24:54 GMT Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.0) with ESMTP id m6H6Os3R196826 for ; Thu, 17 Jul 2008 07:24:54 +0100 Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m6H6OroF025054 for ; Thu, 17 Jul 2008 07:24:54 +0100 In-Reply-To: <487E2863.3000803@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 2008-07-16 at 19:57 +0300, Avi Kivity wrote: > Ben-Ami Yassour wrote: > > =20 > >> That CPU utilization is extremely high and somewhat illogical if n= ative=20 > >> w/vt-d has almost no CPU impact. Have you run oprofile yet or hav= e any=20 > >> insight into where CPU is being burnt? > >> > >> What does kvm_stat look like? I wonder if there are a large numbe= r of=20 > >> PIO exits. What does the interrupt count look like on native vs. = KVM=20 > >> with VT-d? > >> > >> Regards, > >> > >> Anthony Liguori > >> > >> =20 > > > > These are all good points and questions, I agree that we need to ta= ke a deeper=20 > > look into the performance issues, but I think that we need to merge= with=20 > > the main KVM tree first. > > =20 >=20 > It would be good to get the host interrupt rate, to confirm that the=20 > host isn't flooded with interrupts. A deeper analysis can wait. >=20 >=20 Here is an example of a kvm_stat while running iperf: efer_reload 13 0 exits 11372838 58214 fpu_reload 709524 0 halt_exits 139306 0 halt_wakeup 3580 0 host_state_reload 5070783 29031 hypercalls 635636 1 insn_emulation 4306311 22289 insn_emulation_fail 0 0 invlpg 0 0 io_exits 978192 646 irq_exits 2795848 20879 irq_window 0 0 largepages 0 0 mmio_exits 15437 0 mmu_cache_miss 60299 0 mmu_flooded 43213 0 mmu_pde_zapped 49610 0 mmu_pte_updated 576608 1 mmu_pte_write 1203336 1 mmu_recycled 0 0 mmu_shadow_zapped 59348 0 nmi_window 0 0 pf_fixed 571970 0 pf_guest 103889 0 remote_tlb_flush 0 0 request_irq 0 0 signal_exits 1 0 tlb_flush 725366 7 The average host interrupt rate is around 22,200 per second. Note: I would assume that this is bigger then =EF=BB=BFirq_exits, becau= se some of the interrupts occur while we are in host mode so it does not cause an exit. BTW, the interrupt counter on the host and guest is very close. Regards, Ben