diff mbox series

[12/18] mm/mempolicy: Use __alloc_page_node for interleaved

Message ID 20200619162414.1052234-13-ben.widawsky@intel.com (mailing list archive)
State New, archived
Headers show
Series multiple preferred nodes | expand

Commit Message

Ben Widawsky June 19, 2020, 4:24 p.m. UTC
This helps reduce the consumers of the interface and get us in better
shape to clean up some of the low level page allocation routines. The
goal in doing that is to eventually limit the places we'll need to
declare nodemask_t variables on the stack (more on that later).

Currently the only distinction between __alloc_pages_node and
__alloc_pages is that the former does sanity checks on the gfp flags and
the nid. In the case of interleave nodes, this isn't necessary because
the caller has already figured out the right nid and flags with
interleave_nodes(),

This kills the only real user of __alloc_pages, which can then be
removed later.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
---
 mm/mempolicy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 3ce2354fed44..eb2520d68a04 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2220,7 +2220,7 @@  static struct page *alloc_page_interleave(gfp_t gfp, unsigned order,
 {
 	struct page *page;
 
-	page = __alloc_pages(gfp, order, nid);
+	page = __alloc_pages_node(nid, gfp, order);
 	/* skip NUMA_INTERLEAVE_HIT counter update if numa stats is disabled */
 	if (!static_branch_likely(&vm_numa_stat_key))
 		return page;