oom: move oom_killer_enable()/oom_killer_disable to where they belong
[deliverable/linux.git] / mm / sparse-vmemmap.c
index a91b5f8fcaf61e6dc50bfe0526e5b488c3c967c7..d9714bdcb4a387199a5875d9745999942a3aa4f8 100644 (file)
@@ -48,8 +48,14 @@ void * __meminit vmemmap_alloc_block(unsigned long size, int node)
 {
        /* If the main allocator is up use that, fallback to bootmem. */
        if (slab_is_available()) {
-               struct page *page = alloc_pages_node(node,
+               struct page *page;
+
+               if (node_state(node, N_HIGH_MEMORY))
+                       page = alloc_pages_node(node,
                                GFP_KERNEL | __GFP_ZERO, get_order(size));
+               else
+                       page = alloc_pages(GFP_KERNEL | __GFP_ZERO,
+                               get_order(size));
                if (page)
                        return page_address(page);
                return NULL;
@@ -64,7 +70,7 @@ void __meminit vmemmap_verify(pte_t *pte, int node,
        unsigned long pfn = pte_pfn(*pte);
        int actual_node = early_pfn_to_nid(pfn);
 
-       if (actual_node != node)
+       if (node_distance(actual_node, node) > LOCAL_DISTANCE)
                printk(KERN_WARNING "[%lx-%lx] potential offnode "
                        "page_structs\n", start, end - 1);
 }
This page took 0.034993 seconds and 5 git commands to generate.