[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • To: Dave McCracken <dcm@xxxxxxxx>
  • From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
  • Date: Mon, 3 May 2010 17:09:19 +0100
  • Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Xen Developers List <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 03 May 2010 09:13:49 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcrqY+neLe2P2PbORqmHQq60FQTuzQAdxJsM
  • Thread-topic: [Xen-devel] Re: [PATCH] Add hypercall to mark superpages to improve performance

On 03/05/2010 02:55, "Dave McCracken" <dcm@xxxxxxxx> wrote:

> 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 :)

I think you're going to have trouble handling two separate reference counts,
for superpages and single pages, in a race-free manner that is any better
than checking/updating reference counts across all pages in a superpage on
first superpage mapping.

 -- Keir

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.