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] struct page_info

To: Jan Beulich <jbeulich@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, "mukesh.rathor@xxxxxxxxxx" <mukesh.rathor@xxxxxxxxxx>
Subject: RE: [Xen-devel] struct page_info
From: "Cihula, Joseph" <joseph.cihula@xxxxxxxxx>
Date: Fri, 24 Apr 2009 00:21:05 -0700
Accept-language: en-US
Acceptlanguage: en-US
Cc:
Delivery-date: Fri, 24 Apr 2009 00:23:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49F17D61.76EA.0078.0@xxxxxxxxxx>
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: <49F12ECD.3040102@xxxxxxxxxx> <49F17D61.76EA.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnEqNK8BHxMbnFASDKi/S6n2gldKAABDuKw
Thread-topic: [Xen-devel] struct page_info
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On
> Behalf Of Jan Beulich
> Sent: Thursday, April 23, 2009 11:51 PM
>
> >>> Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> 24.04.09 05:15 >>>
> >Now, looking at it, the shadow page is confusing.
> >
> >     /* Page is in use: ((count_info & PGC_count_mask) != 0).  */
> >     ..
> >
> >         /* Page is in use as a shadow: count_info == 0. */
> >     ..
> >     /* Page is on a free list: ((count_info & PGC_count_mask) == 0). */
> >     ..
> >
> >If count_info == 0, and it implies shadow page, how's that different
> >from an unallocated page which also would've count_info=0 I presume?
>
> These are not if-and-only-if conditions, so you can't conclude the use of
> a page from just looking at count_info; only the other way around: from
> e.g. knowing the page is in use as a shadow, you'll know count_info must
> be zero.
>
> >Also, if "Page is on a free list:", I assume one of the PGC_ fields would
> >be set?
>
> Not would, but might.

Would:
        ((page->count_info & PGC_count_mask) != 0 || page->count_info == 0)
definitively indicate if a page was in use?

Joe

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