diff -urpN -X /home/fletch/.diff.exclude 891-early_printk_fix/include/linux/gfp.h 892-gfp_node_strict/include/linux/gfp.h --- 891-early_printk_fix/include/linux/gfp.h Wed Aug 13 20:51:47 2003 +++ 892-gfp_node_strict/include/linux/gfp.h Wed Aug 13 21:09:02 2003 @@ -32,6 +32,7 @@ #define __GFP_NOFAIL 0x800 /* Retry for ever. Cannot fail */ #define __GFP_NORETRY 0x1000 /* Do not retry. Might fail */ #define __GFP_NO_GROW 0x2000 /* Slab internal usage */ +#define __GFP_NODE_STRICT 0x4000 /* Do not fall back to other nodes */ #define GFP_ATOMIC (__GFP_HIGH) #define GFP_NOIO (__GFP_WAIT) diff -urpN -X /home/fletch/.diff.exclude 891-early_printk_fix/mm/page_alloc.c 892-gfp_node_strict/mm/page_alloc.c --- 891-early_printk_fix/mm/page_alloc.c Wed Aug 13 20:29:24 2003 +++ 892-gfp_node_strict/mm/page_alloc.c Wed Aug 13 21:09:02 2003 @@ -560,7 +560,11 @@ __alloc_pages(unsigned int gfp_mask, uns min = 1UL << order; for (i = 0; zones[i] != NULL; i++) { struct zone *z = zones[i]; - + + if ((__GFP_NODE_STRICT & gfp_mask) && + (pfn_to_nid(z->zone_start_pfn) != numa_node_id())) + continue; + min += z->pages_low; if (z->free_pages >= min || (!wait && z->free_pages >= z->pages_high)) {