Allocate shmem directory pages from Normal zone, as the pages are pinned in process spaces. FIXME: This code is temporary, the base code assumes HighMem is hot-pluggable. The pages should be allocated from non hot-pluggable zone or non hot-pluggable memory area, not from Normal zone. Signed-off-by: Hirokazu Takahashi Signed-off-by: Dave Hansen --- memhotplug-dave/mm/shmem.c | 9 +++++++++ 1 files changed, 9 insertions(+) diff -puN mm/shmem.c~AA-PM-25-shmem mm/shmem.c --- memhotplug/mm/shmem.c~AA-PM-25-shmem 2005-07-28 13:50:56.000000000 -0700 +++ memhotplug-dave/mm/shmem.c 2005-07-28 13:50:56.000000000 -0700 @@ -93,7 +93,16 @@ static inline struct page *shmem_dir_all * BLOCKS_PER_PAGE on indirect pages, assume PAGE_CACHE_SIZE: * might be reconsidered if it ever diverges from PAGE_SIZE. */ +#ifdef CONFIG_MEMORY_HOTPLUG + /* + * XXXX: This is temprary code, which should be replaced with proper one + * after the scheme to specify hot removable region has defined. + * 25/Sep/2004 -- taka + */ + return alloc_pages(gfp_mask & ~__GFP_HIGHMEM, PAGE_CACHE_SHIFT-PAGE_SHIFT); +#else return alloc_pages(gfp_mask, PAGE_CACHE_SHIFT-PAGE_SHIFT); +#endif } static inline void shmem_dir_free(struct page *page) _