Index: linux-2.6/mm/page_alloc.c =================================================================== --- linux-2.6.orig/mm/page_alloc.c 2005-04-09 22:45:07.000000000 +1000 +++ linux-2.6/mm/page_alloc.c 2005-04-09 23:13:53.000000000 +1000 @@ -1626,14 +1626,24 @@ void __init build_percpu_pagelists(void) init_percpu_pageset(&zone->pageset, batch); for (cpu = 0; cpu < NR_CPUS; cpu++) { struct zone_pagesets *zp; - struct per_cpu_pageset *pageset; + struct per_cpu_pageset *pageset = NULL; zp = cpu_zone_pagesets(cpu); - pageset = alloc_bootmem_node(pgdat, sizeof(*pageset)); - init_percpu_pageset(pageset, batch); + + /* + * XXX: this test could be something like + * if (node_distance <= blah) + * which would allow pagesets on close + * remote nodes as well as the local node. + */ + if (cpu_to_node(cpu) == nid) { + pageset = alloc_bootmem_node(pgdat, + sizeof(*pageset)); + init_percpu_pageset(pageset, batch); + } zp->p[NODEZONE(nid, j)] = pageset; - } + printk(KERN_DEBUG " %s zone: %lu pages, LIFO batch:%lu\n", zone_names[j], zone->present_pages, batch); }