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: [RFC][PATCH] Basic support for page offline

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Subject: [Xen-devel] RE: [RFC][PATCH] Basic support for page offline
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Mon, 16 Feb 2009 23:25:19 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 16 Feb 2009 07:25:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090216143122.GD17060@xxxxxxxxxxxxxxxxxxxxx>
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: <E2263E4A5B2284449EEBD0AAB751098401C781605D@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20090213170341.GC17060@xxxxxxxxxxxxxxxxxxxxx> <E2263E4A5B2284449EEBD0AAB751098401C796A70E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20090216143122.GD17060@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmQQ0T9VcbB4WyHTmGlkuRXwmhkvAABsoyw
Thread-topic: [RFC][PATCH] Basic support for page offline
 

>-----Original Message-----
>From: Tim Deegan [mailto:Tim.Deegan@xxxxxxxxxx] 
>Sent: 2009年2月16日 22:31
>To: Jiang, Yunhong
>Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
>Subject: Re: [RFC][PATCH] Basic support for page offline
>
>At 04:48 -0500 on 15 Feb (1234673293), Jiang, Yunhong wrote:
>> > The reference counting in update_pgtable_entry() is confusing -- it
>> > should probably always do reference counting for both the 
>old and new
>> > entries; that seems more robust than only doing the decrements
>> > there and
>> > manually setting count_info and type_info on the new page 
>in replace_page.
>> 
>> Sure, I will do like this.
>
>In fact, it should use the existing PTE-updating code -- I 
>suspect that,
>for example, your code won't work at all on a guest that has shadow
>pagetables enabled.

Yes, we need work differently depends on guest's paging mode. I forgot PV guest 
will use shadow mode for log dirty.
Just as you said, doing this in user space tools will be much simpler, I will 
consider more on that option.


>
>> > The tools patch is enormous, and seems to copy big chunks of
>> > xc_domain_save into a new file.  And since Xen is now 
>doing the hard
>> > work of pagetable manipulation, I don't think you even 
>need to suspend
>> > the guest -- just pausing it should be enough and is much easier.
>> 
>> But I'm not sure if we can update the P2M table from Xen side, that's
>> the reason I did the it in the user space.
>
>In that case, why don't you update the pagetables from the tools as
>well?  That way you'd avoid walking the guest pagetables in Xen.  You
>could make all the PTE changes, try to free the page, and if it still
>doesn't work (because there's some other refcount held), put 
>things back
>the way they were.


>
>Tim.
>
>-- 
>Tim Deegan <Tim.Deegan@xxxxxxxxxx>
>Principal Software Engineer, Citrix Systems (R&D) Ltd.
>[Company #02300071, SL9 0DZ, UK.]
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel