The patch titled Subject: mm: memory hot-add: memory can not been added to movable zone has been added to the -mm tree. Its filename is memory-hot-addedthe-memory-can-not-been-added-to-movable-zone.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/memory-hot-addedthe-memory-can-not-been-added-to-movable-zone.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/memory-hot-addedthe-memory-can-not-been-added-to-movable-zone.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Changsheng Liu <liuchangcheng@xxxxxxxxxx> Subject: mm: memory hot-add: memory can not been added to movable zone When memory is hot added, should_add_memory_movable() always returns 0 because the movable zone is empty, so the memory that was hot added will add to the normal zone even if we want to remove the memory. So we change should_add_memory_movable(): if the user config CONFIG_MOVABLE_NODE it will return 1 when the movable zone is empty. Signed-off-by: Changsheng Liu <liuchangcheng@xxxxxxxxxx> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Tang Chen <tangchen@xxxxxxxxxxxxxx> Cc: Gu Zheng <guz.fnst@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory_hotplug.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff -puN mm/memory_hotplug.c~memory-hot-addedthe-memory-can-not-been-added-to-movable-zone mm/memory_hotplug.c --- a/mm/memory_hotplug.c~memory-hot-addedthe-memory-can-not-been-added-to-movable-zone +++ a/mm/memory_hotplug.c @@ -1181,9 +1181,13 @@ static int should_add_memory_movable(int pg_data_t *pgdat = NODE_DATA(nid); struct zone *movable_zone = pgdat->node_zones + ZONE_MOVABLE; - if (zone_is_empty(movable_zone)) + if (zone_is_empty(movable_zone)) { + #ifdef CONFIG_MOVABLE_NODE + return 1; + #else return 0; - + #endif + } if (movable_zone->zone_start_pfn <= start_pfn) return 1; _ Patches currently in -mm which might be from liuchangcheng@xxxxxxxxxx are memory-hot-addedthe-memory-can-not-been-added-to-movable-zone.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html