WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH] EPT: Only sync pcpus on which a domain's vc

To: George Dunlap <dunlapg@xxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] EPT: Only sync pcpus on which a domain's vcpus might be running
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 18 Sep 2009 14:21:01 +0100
Cc: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, Xiaohui Xin <Xiaohui.xin@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Xin Li <xin.b.li@xxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>
Delivery-date: Fri, 18 Sep 2009 06:21:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <de76405a0909180209q4d0ee18ex65673f52ca1d9c9c@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aco4P6qlin2sjcZiQaeqLZmyf8tJEwAIzL9v
Thread-topic: [Xen-devel] Re: [PATCH] EPT: Only sync pcpus on which a domain's vcpus might be running
User-agent: Microsoft-Entourage/12.20.0.090605
On 18/09/2009 10:09, "George Dunlap" <dunlapg@xxxxxxxxx> wrote:

> Just making sure I understand the failure mode... the risk is that if
> we change the p2m for this domain while a vcpu is not running on that
> core, and it's scheduled there again, it may have stale mappings that
> get used (tagged by the EPT base pointer).

Correct.

> Hmm... any idea the performance implications of flushing the EPT
> mappings when switching out?  The main performance problem I need to
> fix is the ballooning case.  Without this patch, on my 2x4x2 Nehalem
> box, a single-vcpu guest ballooning from 16GiB down to 8GiB for an
> initial boot takes 12-15 minutes; with the patch, it takes around 40
> seconds.

How bad is it is you don't flush at all? 40s is still not great and maybe we
could batch the INVEPT invocations? That might also greatly reduce the cost
of the current naïve flush-all implementation, to a point where it is
actually acceptable.

> Perhaps we could start with the flush-ept-on-context-switch-out, and
> do some performance testing later to see if it's worth maintaining a
> "might-need-an-ept-flush" mask.

Well, that's a possible alternative, yes. Just needs a bit of care in
implementation but it wouldn't need much extra code.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel