Re: [PATCH] rmap 13a

Roman Zippel
2002-05-08T18:21:37Z

Hi,

Christoph Hellwig wrote:

> > - NUMA changes for page_address (Samuel Ortiz)
>
> I don't think the changes makes sense. If calculating page_address is
> complicated and slow enough to place it out-of-lin using page->virtual
> is much better.
>
> I'd suggest backing this patch out and instead always maintain page->virtual
> for discontigmem. While at this as a little cleanup you might want to
> define WANT_PAGE_VIRTUAL based on CONFIG_HIGHMEM || CONFIG_DISCONTIGMEM
> at the top of mm.h instead of cluttering it up.

I'd suggest, we move page_address to asm/page.h (as counterpart of
virt_to_page). discontigmem configs can then use some more efficient
table lookup. Other config usually want to implement it better as:

#define page_address(page) ((((page) - mem_map) << PAGE_SHIFT) +
PAGE_OFFSET)

bye, Roman