Re: [ANNOUNCE] kvm-49 release

Sheng Yang
2007-11-02T03:15:24Z

[-- Attachment #1: Type: text/plain, Size: 1176 bytes --]

On Friday 02 November 2007 10:14:35 Haydn Solomon wrote:
> On Nov 1, 2007 9:54 PM, Haydn Solomon <haydn.solomon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > On Nov 1, 2007 9:36 PM, Sheng Yang <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> > > On Friday 02 November 2007 09:10:31 Haydn Solomon wrote:
> > > > How can I tell that my cpu has flexpriority?
> > > >
> > > > (Resending this as didn't cc list last time.)
> > >
> > > Oops, forgot the patch...
> >
> > Thanks Sheng.
> >
> > Luckily for me I've got the Flexpriority feature
> >
> > [root@localhost winxptest]# dmesg | grep lex
> > kvm: FlexPriority enabled!
> >
> > One thing I do notice apart from noticeably very good responsiveness and
> > performance on windows guest ( xp sp2 ) is that this is the lowest cpu
> > usage I've seen on the qemu kvm process to date. I haven't tried smp yet
> > but that will be my next test and will report on how that goes. Thanks
> > guys and well done!
>
> One issue I do see. When I run my windows xp guest which is ACPI
> Multiprocessor PC HAL with -smp 2, it runs much slower and cpu usage is
> high.

Please try the attach patch.

--
Thanks
Yang, Sheng

[-- Attachment #2: 0001-KVM-VMX-Fix-repeatly-allocate-of-apic-access-page.patch --]
[-- Type: text/x-diff, Size: 1447 bytes --]

From 8009718459efe41e0e8bc943a62734353c7828a2 Mon Sep 17 00:00:00 2001
From: Sheng Yang <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Date: Fri, 2 Nov 2007 11:15:15 +0800
Subject: [PATCH] KVM: VMX: Fix repeatly allocate of apic access page

For SMP guest, alloc_apic_access_page() would be called more than once.
So only the last one works, causing SMP guest can't benifit from FlexPriority.

This patch fixed this issue.

Signed-off-by: Sheng Yang <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
drivers/kvm/kvm_main.c | 1 +
drivers/kvm/vmx.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 34a681d..519626d 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -245,6 +245,7 @@ static struct kvm *kvm_create_vm(void)
spin_lock(&kvm_lock);
list_add(&kvm->vm_list, &vm_list);
spin_unlock(&kvm_lock);
+ kvm->apic_access_page = NULL;
return kvm;
}

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index 42e7fad..de4441a 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1466,6 +1466,8 @@ static int alloc_apic_access_page(struct kvm *kvm)
int r;

r = -EFAULT;
+ if (kvm->apic_access_page)
+ return 0;
kvm_userspace_mem.slot = APIC_ACCESS_PAGE_PRIVATE_MEMSLOT;
kvm_userspace_mem.flags = 0;
kvm_userspace_mem.guest_phys_addr = 0xfee00000ULL;
--
1.5.2

[-- Attachment #3: Type: text/plain, Size: 314 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]