From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: Re: [PATCH] EPT: Only sync pcpus on which a domain's vcpus might be running Date: Fri, 18 Sep 2009 14:21:01 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: George Dunlap Cc: Tim Deegan , Xiaohui Xin , "xen-devel@lists.xensource.com" , Xin Li , Jun Nakajima List-Id: xen-devel@lists.xenproject.org On 18/09/2009 10:09, "George Dunlap" 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 w= e could batch the INVEPT invocations? That might also greatly reduce the cost of the current na=EFve 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