Subject: + x86-get-pg_data_ts-memory-from-other-node.patch added to -mm tree To: isimatu.yasuaki@xxxxxxxxxxxxxx,gong.chen@xxxxxxxxxxxxxxx,hannes@xxxxxxxxxxx,hpa@xxxxxxxxx,imtangchen@xxxxxxxxx,izumi.taku@xxxxxxxxxxxxxx,jiang.liu@xxxxxxxxxx,laijs@xxxxxxxxxxxxxx,lenb@xxxxxxxxxx,liwanp@xxxxxxxxxxxxxxxxxx,lwoodman@xxxxxxxxxx,mgorman@xxxxxxx,mina86@xxxxxxxxxx,minchan@xxxxxxxxxx,mingo@xxxxxxx,prarit@xxxxxxxxxx,riel@xxxxxxxxxx,rjw@xxxxxxx,tangchen@xxxxxxxxxxxxxx,tglx@xxxxxxxxxxxxx,tj@xxxxxxxxxx,toshi.kani@xxxxxx,trenn@xxxxxxx,vasilis.liaskovitis@xxxxxxxxxxxxxxxx,wency@xxxxxxxxxxxxxx,yinghai@xxxxxxxxxx,zhangyanfei.yes@xxxxxxxxx,zhangyanfei@xxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Tue, 03 Dec 2013 15:54:35 -0800 The patch titled Subject: x86: get pg_data_t's memory from other node has been added to the -mm tree. Its filename is x86-get-pg_data_ts-memory-from-other-node.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/x86-get-pg_data_ts-memory-from-other-node.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/x86-get-pg_data_ts-memory-from-other-node.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: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx> Subject: x86: get pg_data_t's memory from other node If system can create movable node which all memory of the node is allocated as ZONE_MOVABLE, setup_node_data() cannot allocate memory for the node's pg_data_t. So, invoke memblock_alloc_nid(...MAX_NUMNODES) again to retry when the first allocation fails. Otherwise, the system could failed to boot. (We don't use memblock_alloc_try_nid() to retry because in this function, if the allocation fails, it will panic the system.) The node_data could be on hotpluggable node. And so could pagetable and vmemmap. But for now, doing so will break memory hot-remove path. A node could have several memory devices. And the device who holds node data should be hot-removed in the last place. But in NUMA level, we don't know which memory_block (/sys/devices/system/node/nodeX/memoryXXX) belongs to which memory device. We only have node. So we can only do node hotplug. But in virtualization, developers are now developing memory hotplug in qemu, which support a single memory device hotplug. So a whole node hotplug will not satisfy virtualization users. So at last, we concluded that we'd better do memory hotplug and local node things (local node node data, pagetable, vmemmap, ...) in two steps. Please refer to https://lkml.org/lkml/2013/6/19/73 For now, we put node_data of movable node to another node, and then improve it in the future. Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx> Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx> Signed-off-by: Tang Chen <tangchen@xxxxxxxxxxxxxx> Signed-off-by: Jiang Liu <jiang.liu@xxxxxxxxxx> Signed-off-by: Tang Chen <tangchen@xxxxxxxxxxxxxx> Signed-off-by: Zhang Yanfei <zhangyanfei@xxxxxxxxxxxxxx> Reviewed-by: Wanpeng Li <liwanp@xxxxxxxxxxxxxxxxxx> Acked-by: Toshi Kani <toshi.kani@xxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> CC: "Rafael J . Wysocki" <rjw@xxxxxxx> Cc: Len Brown <lenb@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Cc: Toshi Kani <toshi.kani@xxxxxx> Cc: Wanpeng Li <liwanp@xxxxxxxxxxxxxxxxxx> Cc: Thomas Renninger <trenn@xxxxxxx> Cc: Yinghai Lu <yinghai@xxxxxxxxxx> Cc: Jiang Liu <jiang.liu@xxxxxxxxxx> Cc: Wen Congyang <wency@xxxxxxxxxxxxxx> Cc: Lai Jiangshan <laijs@xxxxxxxxxxxxxx> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@xxxxxxxxxxxxxx> Cc: Taku Izumi <izumi.taku@xxxxxxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Michal Nazarewicz <mina86@xxxxxxxxxx> Cc: Gong Chen <gong.chen@xxxxxxxxxxxxxxx> Cc: Vasilis Liaskovitis <vasilis.liaskovitis@xxxxxxxxxxxxxxxx> Cc: Larry Woodman <lwoodman@xxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Prarit Bhargava <prarit@xxxxxxxxxx> Cc: Chen Tang <imtangchen@xxxxxxxxx> Cc: Tang Chen <tangchen@xxxxxxxxxxxxxx> Cc: Zhang Yanfei <zhangyanfei.yes@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/x86/mm/numa.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff -puN arch/x86/mm/numa.c~x86-get-pg_data_ts-memory-from-other-node arch/x86/mm/numa.c --- a/arch/x86/mm/numa.c~x86-get-pg_data_ts-memory-from-other-node +++ a/arch/x86/mm/numa.c @@ -211,9 +211,14 @@ static void __init setup_node_data(int n */ nd_pa = memblock_alloc_nid(nd_size, SMP_CACHE_BYTES, nid); if (!nd_pa) { - pr_err("Cannot find %zu bytes in node %d\n", - nd_size, nid); - return; + pr_warn("Cannot find %zu bytes in node %d, so try other nodes", + nd_size, nid); + nd_pa = memblock_alloc_nid(nd_size, SMP_CACHE_BYTES, + MAX_NUMNODES); + if (!nd_pa) { + pr_err("Cannot find %zu bytes in any node\n", nd_size); + return; + } } nd = __va(nd_pa); _ Patches currently in -mm which might be from isimatu.yasuaki@xxxxxxxxxxxxxx are mm-get-rid-of-unnecessary-pageblock-scanning-in-setup_zone_migrate_reserve.patch mm-get-rid-of-unnecessary-pageblock-scanning-in-setup_zone_migrate_reserve-fix.patch x86-get-pg_data_ts-memory-from-other-node.patch memblock-numa-introduce-flags-field-into-memblock.patch memblock-mem_hotplug-introduce-memblock_hotplug-flag-to-mark-hotpluggable-regions.patch memblock-make-memblock_set_node-support-different-memblock_type.patch acpi-numa-mem_hotplug-mark-hotpluggable-memory-in-memblock.patch acpi-numa-mem_hotplug-mark-all-nodes-the-kernel-resides-un-hotpluggable.patch memblock-mem_hotplug-make-memblock-skip-hotpluggable-regions-if-needed.patch x86-numa-acpi-memory-hotplug-make-movable_node-have-higher-priority.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