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] Re: [PATCH]Add a flag for shadow pages

To: Gianluca Guida <gianluca.guida@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Re: [PATCH]Add a flag for shadow pages
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Thu, 5 Mar 2009 10:41:07 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Wed, 04 Mar 2009 18:42:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49AEAD0B.7040301@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: <C5D41D1B.3BD5%keir.fraser@xxxxxxxxxxxxx> <C5D440F2.3CB8%keir.fraser@xxxxxxxxxxxxx> <E2263E4A5B2284449EEBD0AAB751098401C7C9DEA9@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <49AEAD0B.7040301@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acmc6HW3uMOmpRSSSrKJzaQw4GhHJQASZvtg
Thread-topic: [Xen-devel] Re: [PATCH]Add a flag for shadow pages
Gianluca Guida <mailto:gianluca.guida@xxxxxxxxxxxxx> wrote:
> Jiang, Yunhong wrote:
>> Thanks for your really quick-hand implementation. I will
> update my another patch accordingly tomorrow.
>> 
>> So still one question to the two assertion (or to Tim??) in
> sh_rm_write_access_from_sl1p()/sh_put_ref(). What's the
> potential error to be protected by this checking? If page is a
> shadow, it's count_info will always be 0, right? Or it is just
> a sanity checking?
> 
> They're sanity checking. Checks are there to be sure that the
> page is a
> shadow page. It used to be "->mbz == 0", which was clearer, in the old
> page_info model. 
> 
> In the sh_rm_write_access_from_sl1p(), the check is there to
> ensure that
> the page is *still* a shadow page. As for current code, though, that check
> should be useless. 
> 
> I actually think that having a more precise way of knowing when a page
> is a shadow page is definitely needed, for debugging or even
> in case the
> shadow allocation becomes more dynamic in the future.

I think a shadow page has always count_info == 0, while count_info==0 does not 
always mean a shadow pages.

> 
>> I need change this is because, if we mark a page offline,
> then the count_info is not 0, even for shadow page. Can I just checking the
> count_mask here? 
> 
> Ehr, I am not following the discussions about your patch, but
> I suppose
> you set the page off-line after all references and uses of the page,
> even inside shadows, are removed. Or the count_info is != 0 to signal
> that the page is going offline?

The latter. We will mark the page offline pending through a new flag. When we 
free the page, we will check the flag to decide the action. So the checking is 
shadow is not valid anymore. I will update it according to Keir's feedback.

Thanks
Yunhong Jiang

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