From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 5 Apr 2007 15:30:06 +0100 (BST) From: Hugh Dickins Subject: Re: [RFC] Free up page->private for compound pages In-Reply-To: Message-ID: References: <20070405033648.GG11192@wotan.suse.de> <20070405035741.GH11192@wotan.suse.de> <20070405042502.GI11192@wotan.suse.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: Nick Piggin , linux-mm@kvack.org, dgc@sgi.com List-ID: On Wed, 4 Apr 2007, Christoph Lameter wrote: > > V1->V2 > - Use alias to PG_reclaim > > +static inline struct page *compound_head(struct page *page) > +{ > + if (unlikely(PageTail(page))) > + return page->first_page; > + return page; > +} > + > static inline int page_count(struct page *page) > { > - if (unlikely(PageCompound(page))) > - page = (struct page *)page_private(page); > - return atomic_read(&page->_count); > + return atomic_read(&compound_head(page)->_count); > } No, you don't want anyone looking at the page_count of a page currently under reclaim, or doing a get_page on it, to go veering off through its page->private (page->first_page comes from another of your patches, not in -mm). Looks like you need to add a test for PageCompound in compound_head (what a surprise!), unfortunately. Hugh -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org