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 1/2] PV hugepages - Xen patch

To: Dave McCracken <dcm@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1/2] PV hugepages - Xen patch
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 08 Oct 2008 19:11:35 +0100
Cc: Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>
Delivery-date: Wed, 08 Oct 2008 11:11:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200810081205.16978.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: AckpcUyaiwe6uJVkEd2D1QAWy6hiGQ==
Thread-topic: [Xen-devel] [PATCH 1/2] PV hugepages - Xen patch
User-agent: Microsoft-Entourage/11.4.0.080122
On 8/10/08 18:05, "Dave McCracken" <dcm@xxxxxxxx> wrote:

> On Friday 03 October 2008, Keir Fraser wrote:
>> Some issues:
>>  * You need to check return value of get_page_from_pagenr() on every page
>> of the superpage. Any one of them can fail, causing you to undo your work
>> so far and then fail.
>>  * You need to get_page_type(PGT_writable) on every page if the superpage
>> mapping asserts _PAGE_RW. Otherwise the guest is getting write access
>> without that being asserted in the reference counts.
>>  * Look at get_page_from_l1e() for an example of how this is done for a
>> single page. You need to do similar work for every page of the super-page.
> 
> Ok, here's a version of the patch with all these issues addressed.
> 
>>  * This surely breaks save/restore, since the restore code is not
>> superpage-aware.
> 
> I don't have this one solved yet.  I'm working on it.

Actually this is an interesting one. For a PV guest it may be in general
unsolvable, since the target machine may not have allocatable 2MB extents.
It may also screw live migration since 2MB is a very coarse granularity to
do dirty-page tracking. One option: perhaps the PV kernel could shatter and
then reconstruct (as best it can) superpage mappings across save/restore?
I'm actually not sure what's for the best here. Perhaps just make 2MB
mappings and save/restore mutually exclusive for now?

 -- Keir



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