From: Wang Nan Date: Wed, 6 Aug 2014 23:07:43 +0000 (-0700) Subject: memory-hotplug: ia64: suitable memory should go to ZONE_MOVABLE X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~14001^2~105 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ed562ae6d76dbe409dddedefc94a54673623dcb5;p=mirror_ubuntu-focal-kernel.git memory-hotplug: ia64: suitable memory should go to ZONE_MOVABLE This patch introduces zone_for_memory() to arch_add_memory() on ia64 to ensure new, higher memory added into ZONE_MOVABLE if movable zone has already setup. Signed-off-by: Wang Nan Cc: Zhang Yanfei Cc: Dave Hansen Cc: Ingo Molnar Cc: Yinghai Lu Cc: "Mel Gorman" Cc: Thomas Gleixner Cc: "H. Peter Anvin" Cc: "Luck, Tony" Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Chris Metcalf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 25c350264a41..892d43e32f3b 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c @@ -631,7 +631,8 @@ int arch_add_memory(int nid, u64 start, u64 size) pgdat = NODE_DATA(nid); - zone = pgdat->node_zones + ZONE_NORMAL; + zone = pgdat->node_zones + + zone_for_memory(nid, start, size, ZONE_NORMAL); ret = __add_pages(nid, zone, start_pfn, nr_pages); if (ret)