From: "Jan Beulich" Subject: Re: struct page_info Date: Fri, 24 Apr 2009 07:50:41 +0100 Message-ID: <49F17D61.76EA.0078.0@novell.com> References: <49F12ECD.3040102@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <49F12ECD.3040102@oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel , mukesh.rathor@oracle.com List-Id: xen-devel@lists.xenproject.org >>> Mukesh Rathor 24.04.09 05:15 >>> >Now, looking at it, the shadow page is confusing. > > /* Page is in use: ((count_info & PGC_count_mask) !=3D 0). */ > .. > > /* Page is in use as a shadow: count_info =3D=3D 0. */ > .. > /* Page is on a free list: ((count_info & PGC_count_mask) =3D=3D = 0). */ > .. > >If count_info =3D=3D 0, and it implies shadow page, how's that different >from an unallocated page which also would've count_info=3D0 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. Jan