From: Minchan Kim Date: Wed, 14 Apr 2010 14:58:36 +0000 (+0900) Subject: slub: Use alloc_pages_exact_node() for page allocation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6b65aaf3027c4e02b42aaefd900aa79136a30681;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: KAMEZAWA Hiroyuki Reviewed-by: Mel Gorman Signed-off-by: Minchan Kim Signed-off-by: Pekka Enberg --- 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, 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)