From: "Jan Beulich" Subject: Re: [RFC] linux: add p[mug]d_clear_full() accessors Date: Wed, 21 May 2008 07:47:29 +0100 Message-ID: <4833E1A1.76E4.0078.0@novell.com> References: <4832FF91.76E4.0078.0@novell.com> <4832EB8F.8010405@goop.org> <48331043.76E4.0078.0@novell.com> <48332E7B.7000407@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <48332E7B.7000407@goop.org> 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: Jeremy Fitzhardinge Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >> One question though - in our 2.6.23 merge (where pv-ops-Xen's >> PG_pinned appeared as an alias of PG_owner_priv_1, and where >> PG_arch_1 got assigned a meaning for native x86, so PG_pinned >> for the traditional patches needed to change anyway) I intentionally >> didn't follow pv-ops for our patches, since PG_pinned is among the >> flags bad_page() checks for (in the XenSource tree, and I think this >> should really also be done in upstream Linux), and hence re-using >> the bit here would change behavior for other parts of the kernel. > >I don't think so. So long as its clear by the time you free the page,=20 >it doesn't matter how it gets used in the meantime (after all, you=20 >should never free a pinned pagetable page). But isn't that one of the purposes of those page flags checks - checking whether e.g. a page may validly get freed (free_pages_check())? All of bad_page(), free_pages_check(), and prep_new_page() currently add PG_pinned into the set of flags cleared/checked, and I continue to think that that is the right thing to do. Jan