linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm, memory_hotplug: pass next_memory_node to new_page_nodemask()
@ 2018-12-13  3:27 Wei Yang
  2018-12-13  4:03 ` Wei Yang
  2018-12-13 20:10 ` kbuild test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yang @ 2018-12-13  3:27 UTC (permalink / raw)
  To: linux-mm; +Cc: akpm, mhocko, osalvador, david, Wei Yang

As the document says new_page_nodemask() will try to allocate from a
different node, but current behavior just do the opposite by passing
current nid as preferred_nid to new_page_nodemask().

This patch pass next_memory_node as preferred_nid to new_page_nodemask()
to fix it.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
---
 mm/memory_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 6910e0eea074..0c075aac0a81 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1335,7 +1335,7 @@ static struct page *new_node_page(struct page *page, unsigned long private)
 	if (nodes_empty(nmask))
 		node_set(nid, nmask);
 
-	return new_page_nodemask(page, nid, &nmask);
+	return new_page_nodemask(page, next_memory_node(nid), &nmask);
 }
 
 #define NR_OFFLINE_AT_ONCE_PAGES	(256)
-- 
2.15.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-13 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13  3:27 [PATCH] mm, memory_hotplug: pass next_memory_node to new_page_nodemask() Wei Yang
2018-12-13  4:03 ` Wei Yang
2018-12-13 20:10 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox