[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <484FDCAB.9020002@firstfloor.org>
Date: Wed, 11 Jun 2008 16:09:47 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: Paul Mundt <lethal@...ux-sh.org>, Rik van Riel <riel@...hat.com>,
clameter@....com, linux-kernel@...r.kernel.org,
lee.schermerhorn@...com, kosaki.motohiro@...fujitsu.com,
linux-mm@...ck.org, eric.whitney@...com,
Ingo Molnar <mingo@...e.hu>, Andy Whitcroft <apw@...dowen.org>
Subject: Removing node flags from page->flags was Re: [PATCH -mm 13/25] Noreclaim
LRU Infrastructure II
After some comptemplation I don't think we need to do anything for this.
Just add more page flags. The ifdef jungle in mm.h should handle it already.
#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS
#define NODES_WIDTH NODES_SHIFT
#else
#ifdef CONFIG_SPARSEMEM_VMEMMAP
#error "Vmemmap: No space for nodes field in page flags"
#endif
#define NODES_WIDTH 0
#endif
[btw the vmemmap case could be handled easily too by going through
the zone, but it's not used on 32bit]
and then
#if !(NODES_WIDTH > 0 || NODES_SHIFT == 0)
#define NODE_NOT_IN_PAGE_FLAGS
#endif
and then
#ifdef NODE_NOT_IN_PAGE_FLAGS
extern int page_to_nid(struct page *page);
#else
static inline int page_to_nid(struct page *page)
{
return (page->flags >> NODES_PGSHIFT) & NODES_MASK;
}
#endif
and the sparse.c page_to_nid does a hash lookup.
So if NR_PAGEFLAGS is big enough it should work.
-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists