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/
Home Products Support Community News


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

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] Add hypercall to mark superpages to improve performance
From: Dave McCracken <dcm@xxxxxxxx>
Date: Sun, 2 May 2010 20:55:32 -0500
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Xen Developers List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 02 May 2010 18:57:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C80360DB.11A0B%keir.fraser@xxxxxxxxxxxxx>
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>
References: <C80360DB.11A0B%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.12.4 (Linux/2.6.32; KDE/4.3.4; x86_64; ; )
On Sunday 02 May 2010, Keir Fraser wrote:
> Oh, now I think about it, although your suggestion deals with type
> conflicts, it doesn't handle page lifetimes. What if a page is only mapped
> as a superpage? The page->count_info would not be incremented by the
> superpage mappings, and the page would be erroneously freed to the Xen free
> pools? So I'm not so sure we can so easily avoid the
> mess-with-every-page's-refcount on first mapping of a superpage... :-(

It should be simple enough to also check superpage->count_info in those 
places.  So the total mappings of a page would be page->count_info + 
superpage->count_info.  Good thing you suggested we also have a count in the 
superpage_info struct :)


Xen-devel mailing list