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][PATCH]Provide 3 times continously writes check and unsha

To: "Xin, Xiaohui" <xiaohui.xin@xxxxxxxxx>
Subject: Re: [Xen-devel][PATCH]Provide 3 times continously writes check and unshadow the guest page
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Wed, 23 Jan 2008 09:51:46 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 23 Jan 2008 01:52:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <9A1462408D6D394C8A7A812E98F00A4D02823CA4@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <9A1462408D6D394C8A7A812E98F00A4D02823CA4@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
Hi, 

At 13:41 +0800 on 23 Jan (1201095692), Xin, Xiaohui wrote:
> The patch checks if the guest continuously writes 3 times to the same
> guest page table pages, if yes, then unshadow the guest pages.

Interesting.  I would expect this to be painful on 64-bit windows, which
writes more intermediate values to pagetables, but the numbers disagree.
Maybe it never writes three values back to back.  Certainly a better way
of detecting when pagetables are reused as data pages is welcome, though
we've been bitten here before.

> The idea is copied from the KVM side. And since the idea has
> overlapped with the now optimization in the now Xen shadow code, so
> the patch removes the optimization part which when the guest writes 2
> continuously 0 to the same page, then unshadow the guest page.

So to summarize, seven of your performance tests get slightly worse, two
get slightly better and two (x64 linux kernel build times and iperf) get
markedly better.  Do you have confidence intervals for the measurements,
by the way?

Do your HVM linux guests have PV drivers?  If not, does using PV drivers
make a difference to iperf?

> +    if ( v->arch.paging.shadow.last_emulated_gfn ==
> +                    mfn_to_gfn(v->domain, gmfn) )

Is there a reason for tracking this a a GFN instead of an MFN?

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]

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