From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave McCracken Subject: Re: Re: [PATCH] Add hypercall to mark superpages to improve performance Date: Sun, 2 May 2010 20:55:32 -0500 Message-ID: <201005022055.32509.dcm@mccr.org> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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: Keir Fraser Cc: Jeremy Fitzhardinge , Xen Developers List List-Id: xen-devel@lists.xenproject.org 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 :) Dave