aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMinchan Kim <minchan.kim@gmail.com>2010-04-14 10:58:36 -0400
committerPekka Enberg <penberg@cs.helsinki.fi>2010-05-22 03:57:31 -0400
commit6b65aaf3027c4e02b42aaefd900aa79136a30681 (patch)
treea5a9b5cb55af436f9216729b734c92ee919a66d1 /mm
parentd3e14aa336b37df76ae875fa051dfdb0e765ddf9 (diff)
slub: Use alloc_pages_exact_node() for page allocation
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 <cl@linux-foundation.org> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Reviewed-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Minchan Kim <minchan.kim@gmail.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 52ae5a538180..2cdd235cb801 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1084,7 +1084,7 @@ static inline struct page *alloc_slab_page(gfp_t flags, int node,
1084 if (node == -1) 1084 if (node == -1)
1085 return alloc_pages(flags, order); 1085 return alloc_pages(flags, order);
1086 else 1086 else
1087 return alloc_pages_node(node, flags, order); 1087 return alloc_pages_exact_node(node, flags, order);
1088} 1088}
1089 1089
1090static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) 1090static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)