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

[Xen-devel] Re: [PATCH] Add hypercall to mark superpages to improve perf

To: Dave McCracken <dcm@xxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] Add hypercall to mark superpages to improve performance
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 28 Apr 2010 07:58:55 +0100
Cc: Xen Developers List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 28 Apr 2010 08:00:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201004280933.20527.dcm@xxxxxxxx>
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: Acrm391Q8jLhKHUHR3ORzClbJggN5gAA3U2X
Thread-topic: [PATCH] Add hypercall to mark superpages to improve performance
User-agent: Microsoft-Entourage/12.23.0.091001
On 28/04/2010 15:33, "Dave McCracken" <dcm@xxxxxxxx> wrote:

> The current method of mapping hugepages/superpages in the hypervisor involves
> updating the reference counts of every page in the superpage.  This has proved
> to be a significant performance bottleneck.
> 
> This patch adds a pair of MMUEXT hypercalls to mark and unmark a superpage.
> Once the superpage is marked, the type is locked to writable page until a
> companion unmark is done.  When that superpage is subsequently mapped, only
> the first page needs to be reference counted.
> 
> There are checks when the superpage is marked and unmarked to make sure no
> individual page mappings have skewed the reference counts.

First of all, that changes the semantics of hugepages, since they can
subsequently *only* be mapped as superpages. I'm not sure that's a
restriction we want. Secondly, I don't really believe that the mark/unmark
hypercalls are race-free -- bearing in mind, that other mappings (superpage
or otherwise) can be constructed or deleted in parallel on other cpus.
Finally, does this really require new hypercalls? Could there not instead be
an always-enabled robust method for Xen to do superpage tracking?

 -- Keir



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