page allocator: do not check NUMA node ID when the caller knows the node is valid
[sfrench/cifs-2.6.git] / kernel / profile.c
index 7724e0409bae7222638fae02c1fe0924e4ae751a..69911b5745eb1a9fd406e7bf3ef4a653033898a2 100644 (file)
@@ -111,12 +111,6 @@ int __ref profile_init(void)
        /* only text is profiled */
        prof_len = (_etext - _stext) >> prof_shift;
        buffer_bytes = prof_len*sizeof(atomic_t);
-       if (!slab_is_available()) {
-               prof_buffer = alloc_bootmem(buffer_bytes);
-               alloc_bootmem_cpumask_var(&prof_cpu_mask);
-               cpumask_copy(prof_cpu_mask, cpu_possible_mask);
-               return 0;
-       }
 
        if (!alloc_cpumask_var(&prof_cpu_mask, GFP_KERNEL))
                return -ENOMEM;
@@ -371,7 +365,7 @@ static int __cpuinit profile_cpu_callback(struct notifier_block *info,
                node = cpu_to_node(cpu);
                per_cpu(cpu_profile_flip, cpu) = 0;
                if (!per_cpu(cpu_profile_hits, cpu)[1]) {
-                       page = alloc_pages_node(node,
+                       page = alloc_pages_exact_node(node,
                                        GFP_KERNEL | __GFP_ZERO,
                                        0);
                        if (!page)
@@ -379,7 +373,7 @@ static int __cpuinit profile_cpu_callback(struct notifier_block *info,
                        per_cpu(cpu_profile_hits, cpu)[1] = page_address(page);
                }
                if (!per_cpu(cpu_profile_hits, cpu)[0]) {
-                       page = alloc_pages_node(node,
+                       page = alloc_pages_exact_node(node,
                                        GFP_KERNEL | __GFP_ZERO,
                                        0);
                        if (!page)
@@ -570,14 +564,14 @@ static int create_hash_tables(void)
                int node = cpu_to_node(cpu);
                struct page *page;
 
-               page = alloc_pages_node(node,
+               page = alloc_pages_exact_node(node,
                                GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
                                0);
                if (!page)
                        goto out_cleanup;
                per_cpu(cpu_profile_hits, cpu)[1]
                                = (struct profile_hit *)page_address(page);
-               page = alloc_pages_node(node,
+               page = alloc_pages_exact_node(node,
                                GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
                                0);
                if (!page)