]> Git Repo - J-linux.git/commitdiff
slub: Use alloc_pages_exact_node() for page allocation
authorMinchan Kim <[email protected]>
Wed, 14 Apr 2010 14:58:36 +0000 (23:58 +0900)
committerPekka Enberg <[email protected]>
Sat, 22 May 2010 07:57:31 +0000 (10:57 +0300)
The alloc_slab_page() in SLUB uses alloc_pages() if node is '-1'.  This means
that node validity check in alloc_pages_node is unnecessary and we can use
alloc_pages_exact_node() to avoid comparison and branch as commit
6484eb3e2a81807722 ("page allocator: do not check NUMA node ID when the caller
knows the node is valid") did for the page allocator.

Cc: Christoph Lameter <[email protected]>
Reviewed-by: KAMEZAWA Hiroyuki <[email protected]>
Reviewed-by: Mel Gorman <[email protected]>
Signed-off-by: Minchan Kim <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
mm/slub.c

index 52ae5a53818053b61241062023ba1951f426329a..2cdd235cb80166b000543e3bd4e2a8cd2812320c 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1084,7 +1084,7 @@ static inline struct page *alloc_slab_page(gfp_t flags, int node,
        if (node == -1)
                return alloc_pages(flags, order);
        else
-               return alloc_pages_node(node, flags, order);
+               return alloc_pages_exact_node(node, flags, order);
 }
 
 static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
This page took 0.051548 seconds and 4 git commands to generate.