diff -aurpN -X /home/fletch/.diff.exclude 700-export_cpu_2_node/mm/page_alloc.c 710-distrubte_boot_allocs/mm/page_alloc.c --- 700-export_cpu_2_node/mm/page_alloc.c Wed Feb 11 10:14:47 2004 +++ 710-distrubte_boot_allocs/mm/page_alloc.c Wed Feb 11 10:17:42 2004 @@ -689,6 +689,42 @@ got_pg: EXPORT_SYMBOL(__alloc_pages); +#ifdef CONFIG_NUMA +/* Early boot: Everything is done by one cpu, but the data structures will be + * used by all cpus - spread them on all nodes. + */ +static __init unsigned long get_boot_pages(unsigned int gfp_mask, unsigned int order) +{ +static int nodenr; + int i = nodenr; + struct page *page; + + for (;;) { + if (i > nodenr + numnodes) + return 0; + if (node_present_pages(i%numnodes)) { + struct zone **z; + /* The node contains memory. Check that there is + * memory in the intended zonelist. + */ + z = NODE_DATA(i%numnodes)->node_zonelists[gfp_mask & GFP_ZONEMASK].zones; + while (*z) { + if ( (*z)->free_pages > (1UL<