From patchwork Sun Mar 29 19:10:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 15036 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2TJ9rsA015089 for ; Sun, 29 Mar 2009 19:09:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752449AbZC2TJx (ORCPT ); Sun, 29 Mar 2009 15:09:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751617AbZC2TJx (ORCPT ); Sun, 29 Mar 2009 15:09:53 -0400 Received: from mx2.redhat.com ([66.187.237.31]:51918 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752449AbZC2TJw (ORCPT ); Sun, 29 Mar 2009 15:09:52 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n2TJ9onm025956; Sun, 29 Mar 2009 15:09:50 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2TJ9oco021386; Sun, 29 Mar 2009 15:09:50 -0400 Received: from mermaid.qumranet.com (vpn-12-17.rdu.redhat.com [10.11.12.17]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n2TJ9k6i020280; Sun, 29 Mar 2009 15:09:47 -0400 Message-ID: <49CFC7A2.3030808@redhat.com> Date: Sun, 29 Mar 2009 22:10:26 +0300 From: Avi Kivity User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Kurt Yoder CC: kvm@vger.kernel.org, Joerg Roedel Subject: Re: IO on guest is 20 times slower than host References: <49CA5825.7030201@redhat.com> <4AC00930-1EBB-4704-94CF-29478D07F03A@yoderhome.com> <49CA5D53.1080401@redhat.com> <49CA61E2.3050400@redhat.com> <49CA6FFC.2030807@redhat.com> <49CB55F3.5030208@redhat.com> <52808.140.147.222.3.1238162037.squirrel@dyn.yoderhome.com> <52849.140.147.222.3.1238162627.squirrel@dyn.yoderhome.com> <52871.140.147.222.3.1238163053.squirrel@dyn.yoderhome.com> <49CF85D3.1020507@redhat.com> In-Reply-To: <49CF85D3.1020507@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Avi Kivity wrote: > Kurt Yoder wrote: >> slow host cpu information, core 1 of 16: >> >> processor : 0 >> vendor_id : AuthenticAMD >> cpu family : 16 >> model : 4 >> model name : Quad-Core AMD Opteron(tm) Processor 8382 >> stepping : 2 >> cpu MHz : 2611.998 >> cache size : 512 KB >> physical id : 0 >> siblings : 4 >> core id : 0 >> cpu cores : 4 >> apicid : 0 >> initial apicid : 0 >> fpu : yes >> fpu_exception : yes >> cpuid level : 5 >> wp : yes >> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr >> pge mca >> cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall mmxext fxsr_opt >> pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl pni monitor >> cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a >> misalignsse 3dnowprefetch osvw ibs skinit wdt >> bogomips : 5223.97 >> TLB size : 1024 4K pages >> clflush size : 64 >> cache_alignment : 64 >> address sizes : 48 bits physical, 48 bits virtual >> power management: ts ttp tm stc 100mhzsteps hwpstate >> >> >> > > Can you loading kvm_amd on this host with 'modprobe kvm-amd npt=0'? > If it helps, then the guest is messing up the cpu cache. Try the attached patch. diff --git a/kernel/x86/kvm/svm.c b/kernel/x86/kvm/svm.c index 1fcbc17..d9774e9 100644 --- a/kernel/x86/kvm/svm.c +++ b/kernel/x86/kvm/svm.c @@ -575,7 +575,7 @@ static void init_vmcb(struct vcpu_svm *svm) INTERCEPT_CR3_MASK); control->intercept_cr_write &= ~(INTERCEPT_CR0_MASK| INTERCEPT_CR3_MASK); - save->g_pat = 0x0007040600070406ULL; + save->g_pat = 0x0606060606060606ULL; /* enable caching because the QEMU Bios doesn't enable it */ save->cr0 = X86_CR0_ET; save->cr3 = 0;