diff -purN -X /home/mbligh/.diff.exclude 670-tiocgdev/mm/page_alloc.c 710-distrubte_boot_allocs/mm/page_alloc.c --- 670-tiocgdev/mm/page_alloc.c 2004-02-18 16:23:05.000000000 -0800 +++ 710-distrubte_boot_allocs/mm/page_alloc.c 2004-02-20 15:57:13.000000000 -0800 @@ -688,6 +688,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<