From: akpm@linux-foundation.org Subject: [alternative-merged] x86-get-pg_data_ts-memory-from-other-node.patch removed from -mm tree Date: Tue, 07 Jan 2014 12:40:26 -0800 Message-ID: <52cc663a.fzeDsbO9SKIDzO4J%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:59110 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751541AbaAGUk2 (ORCPT ); Tue, 7 Jan 2014 15:40:28 -0500 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org, zhangyanfei@cn.fujitsu.com, zhangyanfei.yes@gmail.com, yinghai@kernel.org, wency@cn.fujitsu.com, vasilis.liaskovitis@profitbricks.com, trenn@suse.de, toshi.kani@hp.com, tj@kernel.org, tglx@linutronix.de, tangchen@cn.fujitsu.com, rjw@sisk.pl, riel@redhat.com, prarit@redhat.com, mingo@elte.hu, minchan@kernel.org, mina86@mina86.com, mgorman@suse.de, lwoodman@redhat.com, liwanp@linux.vnet.ibm.com, lenb@kernel.org, laijs@cn.fujitsu.com, jiang.liu@huawei.com, izumi.taku@jp.fujitsu.com, imtangchen@gmail.com, hpa@zytor.com, hannes@cmpxchg.org, gong.chen@linux.intel.com, isimatu.yasuaki@jp.fujitsu.com Subject: [alternative-merged] x86-get-pg_data_ts-memory-from-other-node.patch removed from -mm tree To: isimatu.yasuaki@jp.fujitsu.com,gong.chen@linux.intel.com,hannes@cmpxchg.org,hpa@zytor.com,imtangchen@gmail.com,izumi.taku@jp.fujitsu.com,jiang.liu@huawei.com,laijs@cn.fujitsu.com,lenb@kernel.org,liwanp@linux.vnet.ibm.com,lwoodman@redhat.com,mgorman@suse.de,mina86@mina86.com,minchan@kernel.org,mingo@elte.hu,prarit@redhat.com,riel@redhat.com,rjw@sisk.pl,tangchen@cn.fujitsu.com,tglx@linutronix.de,tj@kernel.org,toshi.kani@hp.com,trenn@suse.de,vasilis.liaskovitis@profitbricks.com,wency@cn.fujitsu.com,yinghai@kernel.org,zhangyanfei.yes@gmail.com,zhangyanfei@cn.fujitsu.com,mm-commits@vger.kernel.org From: akpm@linux-foundation.org Date: Tue, 07 Jan 2014 12:40:26 -0800 The patch titled Subject: x86: get pg_data_t's memory from other node has been removed from the -mm tree. Its filename was x86-get-pg_data_ts-memory-from-other-node.patch This patch was dropped because an alternative patch was merged ------------------------------------------------------ From: Yasuaki Ishimatsu 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 Signed-off-by: Lai Jiangshan Signed-off-by: Tang Chen Signed-off-by: Jiang Liu Signed-off-by: Zhang Yanfei Reviewed-by: Wanpeng Li Acked-by: Toshi Kani Cc: Tejun Heo CC: "Rafael J . Wysocki" Cc: Len Brown Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Toshi Kani Cc: Wanpeng Li Cc: Thomas Renninger Cc: Yinghai Lu Cc: Jiang Liu Cc: Wen Congyang Cc: Lai Jiangshan Cc: Yasuaki Ishimatsu Cc: Taku Izumi Cc: Mel Gorman Cc: Minchan Kim Cc: Michal Nazarewicz Cc: Gong Chen Cc: Vasilis Liaskovitis Cc: Larry Woodman Cc: Rik van Riel Cc: Johannes Weiner Cc: Prarit Bhargava Cc: Chen Tang Cc: Tang Chen Cc: Zhang Yanfei Signed-off-by: Andrew Morton --- 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@jp.fujitsu.com are linux-next.patch 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 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