]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - mm/page_alloc.c
Memoryless nodes: Add N_CPU node state
[net-next-2.6.git] / mm / page_alloc.c
index 07dfd89992fa6d0ee90cf0ca6646a43d7dd926e2..161bcb711b306ac6a843d6f3f4f29f08de43c86f 100644 (file)
@@ -2353,6 +2353,9 @@ static struct per_cpu_pageset boot_pageset[NR_CPUS];
 static int __cpuinit process_zones(int cpu)
 {
        struct zone *zone, *dzone;
+       int node = cpu_to_node(cpu);
+
+       node_set_state(node, N_CPU);    /* this node has a cpu */
 
        for_each_zone(zone) {
 
@@ -2360,7 +2363,7 @@ static int __cpuinit process_zones(int cpu)
                        continue;
 
                zone_pcp(zone, cpu) = kmalloc_node(sizeof(struct per_cpu_pageset),
-                                        GFP_KERNEL, cpu_to_node(cpu));
+                                        GFP_KERNEL, node);
                if (!zone_pcp(zone, cpu))
                        goto bad;