[PATCH] pgtables: fix GFP_KERNEL allocation with preempt disabled

From: Martin Hicks
Date: Tue Apr 19 2005 - 12:05:28 EST



Hi Andrew,

This is a fix to the pgtable_quicklist code. There is a GFP_KERNEL
allocation in pgtable_quicklist_alloc(), which spews the usual warnings
if the kernel is under heavy VM pressure and the reclaim code is
invoked.

This patch is against 2.6.12-rc2-mm2

Signed-off-by: Martin Hicks <mort@xxxxxxx>


Index: linux-2.6.12-rc2.wk/include/asm-ia64/pgalloc.h
===================================================================
--- linux-2.6.12-rc2.wk.orig/include/asm-ia64/pgalloc.h 2005-04-19 09:01:06.000000000 -0700
+++ linux-2.6.12-rc2.wk/include/asm-ia64/pgalloc.h 2005-04-19 09:53:39.000000000 -0700
@@ -50,7 +50,7 @@ static inline void *pgtable_quicklist_al
ret[0] = 0;
--pgtable_quicklist_size;
} else {
- ret = (unsigned long *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
+ ret = (unsigned long *)__get_free_page(GFP_ATOMIC | __GFP_ZERO);
}

preempt_enable();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/