[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] rmap 13a



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
--
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/