public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "Haydn Solomon" <haydn.solomon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Subject: Re: [ANNOUNCE] kvm-49 release
Date: Fri, 2 Nov 2007 11:15:24 +0800	[thread overview]
Message-ID: <200711021115.24505.sheng.yang@intel.com> (raw)
In-Reply-To: <b75785ba0711011914m121ac6c7wb3d911e93ec3190-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- 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 --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

  parent reply	other threads:[~2007-11-02  3:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 23:12 [ANNOUNCE] kvm-49 release Avi Kivity
     [not found] ` <472A5D42.6080508-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-01 23:16   ` Avi Kivity
2007-11-02  1:10   ` Haydn Solomon
     [not found]     ` <b75785ba0711011810q7ebce142y39658d960cf6d11e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-11-02  1:30       ` Sheng Yang
     [not found]         ` <200711020930.36289.sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2007-11-05 15:49           ` Avi Kivity
2007-11-02  1:36       ` Sheng Yang
     [not found]         ` <200711020936.42041.sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2007-11-02  1:54           ` Haydn Solomon
     [not found]             ` <b75785ba0711011854q5947e584rd7f6146fac1fc508-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-11-02  2:14               ` Haydn Solomon
     [not found]                 ` <b75785ba0711011914m121ac6c7wb3d911e93ec3190-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-11-02  2:19                   ` Yang, Sheng
2007-11-02  3:15                   ` Sheng Yang [this message]
     [not found]                     ` <200711021115.24505.sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2007-11-02  4:56                       ` Haydn Solomon
     [not found]                         ` <b75785ba0711012156w373c9f5fo2fd9fd2dbebbca52-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-11-02  4:57                           ` Sheng Yang
2007-11-02  1:55   ` Zhao, Yunfeng
     [not found]     ` <10EA09EFD8728347A513008B6B0DA77A0250DC1E-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-11-04  7:47       ` Avi Kivity
     [not found]         ` <472D7913.9040401-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-11-04  7:42           ` Izik Eidus
  -- strict thread matches above, loose matches on Subject: below --
2007-10-29  2:44 Avi Kivity
     [not found] ` <472548F1.9050903-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-29  2:54   ` Haydn Solomon
     [not found]     ` <b75785ba0710281954s3e4b1909na1844926eb740a00-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-10-29  8:29       ` Izik Eidus
     [not found]         ` <472599D6.8060901-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-29 12:48           ` Haydn Solomon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200711021115.24505.sheng.yang@intel.com \
    --to=sheng.yang-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=haydn.solomon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox