From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prarit Bhargava Subject: [PATCH 0/2] Add option to disable ACPI Memory Hotplug Date: Fri, 10 Jan 2014 14:04:56 -0500 Message-ID: <1389380698-19361-2-git-send-email-prarit@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> Return-path: In-Reply-To: <1389380698-19361-1-git-send-email-prarit@redhat.com> Sender: owner-linux-mm@kvack.org To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , =50@, x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org List-Id: linux-acpi@vger.kernel.org This patchset adds the ability for the user to disable ACPI Memory Hotplug by adding "acpi_no_memhotplug" as a kernel paramaeter, and disables ACPI Memory Hotplug by default when the memmap=exactmap and mem=X parameters are used. Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" =50%) Cc: x86@kernel.org Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Linn Crosetto Cc: Pekka Enberg Cc: Yinghai Lu Cc: Andrew Morton Cc: Toshi Kani Cc: Tang Chen Cc: Wen Congyang Cc: Vivek Goyal Cc: kosaki.motohiro@gmail.com Cc: dyoung@redhat.com Cc: Toshi Kani Cc: linux-acpi@vger.kernel.org Cc: linux-mm@kvack.org Prarit Bhargava (2): acpi memory hotplug, add parameter to disable memory hotplug [v2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user Documentation/kernel-parameters.txt | 3 +++ arch/x86/kernel/e820.c | 8 +++++++- drivers/acpi/acpi_memhotplug.c | 17 +++++++++++++++++ include/linux/memory_hotplug.h | 3 +++ 4 files changed, 30 insertions(+), 1 deletion(-) -- 1.7.9.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prarit Bhargava Subject: [PATCH 0/2] Add option to disable ACPI Memory Hotplug [v2] Date: Fri, 10 Jan 2014 14:04:55 -0500 Message-ID: <1389380698-19361-1-git-send-email-prarit@redhat.com> Return-path: Sender: owner-linux-mm@kvack.org To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org List-Id: linux-acpi@vger.kernel.org This patchset adds the ability for the user to disable ACPI Memory Hotplug by adding "acpi_no_memhotplug" as a kernel paramaeter, and disables ACPI Memory Hotplug by default when the memmap=exactmap and mem=X parameters are used. Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Linn Crosetto Cc: Pekka Enberg Cc: Yinghai Lu Cc: Andrew Morton Cc: Toshi Kani Cc: Tang Chen Cc: Wen Congyang Cc: Vivek Goyal Cc: kosaki.motohiro@gmail.com Cc: dyoung@redhat.com Cc: Toshi Kani Cc: linux-acpi@vger.kernel.org Cc: linux-mm@kvack.org Prarit Bhargava (2): acpi memory hotplug, add parameter to disable memory hotplug [v2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Documentation/kernel-parameters.txt | 3 +++ arch/x86/kernel/e820.c | 10 +++++++++- drivers/acpi/acpi_memhotplug.c | 17 +++++++++++++++++ include/linux/memory_hotplug.h | 3 +++ 4 files changed, 32 insertions(+), 1 deletion(-) -- 1.7.9.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prarit Bhargava Subject: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Fri, 10 Jan 2014 14:04:58 -0500 Message-ID: <1389380698-19361-4-git-send-email-prarit@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> Return-path: In-Reply-To: <1389380698-19361-1-git-send-email-prarit@redhat.com> Sender: owner-linux-mm@kvack.org To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org List-Id: linux-acpi@vger.kernel.org kdump uses memmap=exactmap and mem=X values to configure the memory mapping for the kdump kernel. If memory is hotadded during the boot of the kdump kernel it is possible that the page tables for the new memory cause the kdump kernel to run out of memory. Since the user has specified a specific mapping ACPI Memory Hotplug should be disabled in this case. [v2]: really add mem= Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Linn Crosetto Cc: Pekka Enberg Cc: Yinghai Lu Cc: Andrew Morton Cc: Toshi Kani Cc: Tang Chen Cc: Wen Congyang Cc: Vivek Goyal Cc: kosaki.motohiro@gmail.com Cc: dyoung@redhat.com Cc: Toshi Kani Cc: linux-acpi@vger.kernel.org Cc: linux-mm@kvack.org --- arch/x86/kernel/e820.c | 10 +++++++++- drivers/acpi/acpi_memhotplug.c | 7 ++++++- include/linux/memory_hotplug.h | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 174da5f..747f36a 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -834,6 +835,8 @@ static int __init parse_memopt(char *p) return -EINVAL; e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1); + set_acpi_no_memhotplug(); + return 0; } early_param("mem", parse_memopt); @@ -880,15 +883,20 @@ static int __init parse_memmap_one(char *p) return *p == '\0' ? 0 : -EINVAL; } + static int __init parse_memmap_opt(char *str) { + int ret; + while (str) { char *k = strchr(str, ','); if (k) *k++ = 0; - parse_memmap_one(str); + ret = parse_memmap_one(str); + if (!ret) + set_acpi_no_memhotplug(); str = k; } diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 4a0fa94..48b9267 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -363,6 +363,11 @@ static void acpi_memory_device_remove(struct acpi_device *device) static bool acpi_no_memhotplug; +void set_acpi_no_memhotplug(void) +{ + acpi_no_memhotplug = true; +} + void __init acpi_memory_hotplug_init(void) { if (acpi_no_memhotplug) @@ -373,7 +378,7 @@ void __init acpi_memory_hotplug_init(void) static int __init disable_acpi_memory_hotplug(char *str) { - acpi_no_memhotplug = true; + set_acpi_no_memhotplug(); return 1; } __setup("acpi_no_memhotplug", disable_acpi_memory_hotplug); diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 4ca3d95..80f5a23 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -12,6 +12,9 @@ struct pglist_data; struct mem_section; struct memory_block; +/* set flag to disable ACPI memory hotplug */ +extern void set_acpi_no_memhotplug(void); + #ifdef CONFIG_MEMORY_HOTPLUG /* -- 1.7.9.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prarit Bhargava Subject: [PATCH 1/2] acpi memory hotplug, add parameter to disable memory hotplug [v2] Date: Fri, 10 Jan 2014 14:04:57 -0500 Message-ID: <1389380698-19361-3-git-send-email-prarit@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> Return-path: In-Reply-To: <1389380698-19361-1-git-send-email-prarit@redhat.com> Sender: owner-linux-mm@kvack.org To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org List-Id: linux-acpi@vger.kernel.org When booting a kexec/kdump kernel on a system that has specific memory hotplug regions the boot will fail with warnings like: [ 2.939467] swapper/0: page allocation failure: order:9, mode:0x84d0 [ 2.946564] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-65.el7.x86_64 #1 [ 2.954532] Hardware name: QCI QSSC-S4R/QSSC-S4R, BIOS QSSC-S4R.QCI.01.00.S013.032920111005 03/29/2011 [ 2.964926] 0000000000000000 ffff8800341bd8c8 ffffffff815bcc67 ffff8800341bd950 [ 2.973224] ffffffff8113b1a0 ffff880036339b00 0000000000000009 00000000000084d0 [ 2.981523] ffff8800341bd950 ffffffff815b87ee 0000000000000000 0000000000000200 [ 2.989821] Call Trace: [ 2.992560] [] dump_stack+0x19/0x1b [ 2.998300] [] warn_alloc_failed+0xf0/0x160 [ 3.004817] [] ? __alloc_pages_direct_compact+0xac/0x196 [ 3.012594] [] __alloc_pages_nodemask+0x7ff/0xa00 [ 3.019692] [] vmemmap_alloc_block+0x62/0xba [ 3.026303] [] vmemmap_alloc_block_buf+0x15/0x3b [ 3.033302] [] vmemmap_populate+0xb4/0x21b [ 3.039718] [] sparse_mem_map_populate+0x27/0x35 [ 3.046717] [] sparse_add_one_section+0x7a/0x185 [ 3.053720] [] __add_pages+0xaf/0x240 [ 3.059656] [] arch_add_memory+0x59/0xd0 [ 3.065877] [] add_memory+0xb9/0x1b0 [ 3.071713] [] acpi_memory_device_add+0x18d/0x26d [ 3.078813] [] acpi_bus_device_attach+0x7d/0xcd [ 3.085719] [] acpi_ns_walk_namespace+0xc8/0x17f [ 3.092716] [] ? acpi_bus_type_and_status+0x90/0x90 [ 3.100004] [] ? acpi_bus_type_and_status+0x90/0x90 [ 3.107293] [] acpi_walk_namespace+0x95/0xc5 [ 3.113904] [] acpi_bus_scan+0x8b/0x9d [ 3.119933] [] acpi_scan_init+0x63/0x160 [ 3.126153] [] acpi_init+0x25d/0x2a6 [ 3.131987] [] ? acpi_sleep_proc_init+0x2a/0x2a [ 3.138889] [] do_one_initcall+0xe2/0x190 [ 3.145210] [] kernel_init_freeable+0x17c/0x207 [ 3.152111] [] ? do_early_param+0x88/0x88 [ 3.158430] [] ? rest_init+0x80/0x80 [ 3.164264] [] kernel_init+0xe/0x180 [ 3.170097] [] ret_from_fork+0x7c/0xb0 [ 3.176123] [] ? rest_init+0x80/0x80 [ 3.181956] Mem-Info: [ 3.184490] Node 0 DMA per-cpu: [ 3.188007] CPU 0: hi: 0, btch: 1 usd: 0 [ 3.193353] Node 0 DMA32 per-cpu: [ 3.197060] CPU 0: hi: 42, btch: 7 usd: 0 [ 3.202410] active_anon:0 inactive_anon:0 isolated_anon:0 [ 3.202410] active_file:0 inactive_file:0 isolated_file:0 [ 3.202410] unevictable:0 dirty:0 writeback:0 unstable:0 [ 3.202410] free:872 slab_reclaimable:13 slab_unreclaimable:1880 [ 3.202410] mapped:0 shmem:0 pagetables:0 bounce:0 [ 3.202410] free_cma:0 because the system has run out of memory at boot time. This occurs because of the following sequence in the boot: Main kernel boots and sets E820 map. The second kernel is booted with a map generated by the kdump service using memmap= and memmap=exactmap. These parameters are added to the kernel parameters of the kexec/kdump kernel. The kexec/kdump kernel has limited memory resources so as not to severely impact the main kernel. The system then panics and the kdump/kexec kernel boots (which is a completely new kernel boot). During this boot ACPI is initialized and the kernel (as can be seen above) traverses the ACPI namespace and finds an entry for a memory device to be hotadded. ie) [ 3.053720] [] __add_pages+0xaf/0x240 [ 3.059656] [] arch_add_memory+0x59/0xd0 [ 3.065877] [] add_memory+0xb9/0x1b0 [ 3.071713] [] acpi_memory_device_add+0x18d/0x26d [ 3.078813] [] acpi_bus_device_attach+0x7d/0xcd [ 3.085719] [] acpi_ns_walk_namespace+0xc8/0x17f [ 3.092716] [] ? acpi_bus_type_and_status+0x90/0x90 [ 3.100004] [] ? acpi_bus_type_and_status+0x90/0x90 [ 3.107293] [] acpi_walk_namespace+0x95/0xc5 [ 3.113904] [] acpi_bus_scan+0x8b/0x9d [ 3.119933] [] acpi_scan_init+0x63/0x160 [ 3.126153] [] acpi_init+0x25d/0x2a6 At this point the kernel adds page table information and the the kexec/kdump kernel runs out of memory. This can also be reproduced by using the memmap=exactmap and mem=X parameters on the main kernel and booting. This patchset resolves the problem by adding a kernel parameter, acpi_no_memhotplug, to disable ACPI memory hotplug. [v2]: changed acpi_no_memhotplug to bool Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Linn Crosetto Cc: Pekka Enberg Cc: Yinghai Lu Cc: Andrew Morton Cc: Toshi Kani Cc: Tang Chen Cc: Wen Congyang Cc: Vivek Goyal Cc: kosaki.motohiro@gmail.com Cc: dyoung@redhat.com Cc: Toshi Kani Cc: linux-acpi@vger.kernel.org Cc: linux-mm@kvack.org --- Documentation/kernel-parameters.txt | 3 +++ drivers/acpi/acpi_memhotplug.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b9e9bd8..41374f9 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -2117,6 +2117,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. nomce [X86-32] Machine Check Exception + acpi_no_memhotplug [ACPI] Disable memory hotplug. Useful for kexec + and kdump kernels. + nomfgpt [X86-32] Disable Multi-Function General Purpose Timer usage (for AMD Geode machines). diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 551dad7..4a0fa94 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -361,7 +361,19 @@ static void acpi_memory_device_remove(struct acpi_device *device) acpi_memory_device_free(mem_device); } +static bool acpi_no_memhotplug; + void __init acpi_memory_hotplug_init(void) { + if (acpi_no_memhotplug) + return; + acpi_scan_add_handler_with_hotplug(&memory_device_handler, "memory"); } + +static int __init disable_acpi_memory_hotplug(char *str) +{ + acpi_no_memhotplug = true; + return 1; +} +__setup("acpi_no_memhotplug", disable_acpi_memory_hotplug); -- 1.7.9.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vivek Goyal Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Fri, 10 Jan 2014 16:12:04 -0500 Message-ID: <20140110211204.GC19115@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1389380698-19361-4-git-send-email-prarit@redhat.com> Sender: owner-linux-mm@kvack.org To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org List-Id: linux-acpi@vger.kernel.org On Fri, Jan 10, 2014 at 02:04:58PM -0500, Prarit Bhargava wrote: > kdump uses memmap=exactmap and mem=X values Minor nit. Kdump only uses memmap=exactmap and not mem=X. mem=X is there for debugging. So lets fix the changelog. [..] > static int __init parse_memmap_opt(char *str) > { > + int ret; > + > while (str) { > char *k = strchr(str, ','); > > if (k) > *k++ = 0; > > - parse_memmap_one(str); > + ret = parse_memmap_one(str); > + if (!ret) > + set_acpi_no_memhotplug(); We want to call this only in case of memmap=exactmap and not other memmap= options. So I think instead of here, call it inside parse_memmap_one() where exactmap check is done. if (!strncmp(p, "exactmap", 8)) { set_acpi_no_memhotplug(); } Thanks Vivek -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH 1/2] acpi memory hotplug, add parameter to disable memory hotplug [v2] Date: Fri, 10 Jan 2014 14:34:01 -0700 Message-ID: <1389389641.1792.173.camel@misato.fc.hp.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-3-git-send-email-prarit@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1389380698-19361-3-git-send-email-prarit@redhat.com> Sender: owner-linux-mm@kvack.org To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org List-Id: linux-acpi@vger.kernel.org On Fri, 2014-01-10 at 14:04 -0500, Prarit Bhargava wrote: : > --- > Documentation/kernel-parameters.txt | 3 +++ > drivers/acpi/acpi_memhotplug.c | 12 ++++++++++++ > 2 files changed, 15 insertions(+) > > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt > index b9e9bd8..41374f9 100644 > --- a/Documentation/kernel-parameters.txt > +++ b/Documentation/kernel-parameters.txt > @@ -2117,6 +2117,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. > > nomce [X86-32] Machine Check Exception > > + acpi_no_memhotplug [ACPI] Disable memory hotplug. Useful for kexec > + and kdump kernels. > + Please move it to where other acpi_xxx are described. For kdump kernel, this option will be used when memmap=exactmap is deprecated. IOW, it is not useful yet. Not sure what you mean by kexec kernel. Memory hotplug does not need to be disabled for kexec reboot. Thanks, -Toshi -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Fri, 10 Jan 2014 14:34:48 -0700 Message-ID: <1389389688.1792.174.camel@misato.fc.hp.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1389380698-19361-4-git-send-email-prarit@redhat.com> Sender: owner-linux-mm@kvack.org To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org List-Id: linux-acpi@vger.kernel.org On Fri, 2014-01-10 at 14:04 -0500, Prarit Bhargava wrote: : > arch/x86/kernel/e820.c | 10 +++++++++- > drivers/acpi/acpi_memhotplug.c | 7 ++++++- > include/linux/memory_hotplug.h | 3 +++ > 3 files changed, 18 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c > index 174da5f..747f36a 100644 > --- a/arch/x86/kernel/e820.c > +++ b/arch/x86/kernel/e820.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -834,6 +835,8 @@ static int __init parse_memopt(char *p) > return -EINVAL; > e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1); > > + set_acpi_no_memhotplug(); > + It won't build when CONFIG_ACPI_HOTPLUG_MEMORY is not defined. Thanks, -Toshi -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: 7eggert@gmx.de Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Sat, 11 Jan 2014 16:35:00 +0000 (UTC) Message-ID: References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <1389380698-19361-4-git-send-email-prarit@redhat.com> Sender: owner-linux-mm@kvack.org To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org List-Id: linux-acpi@vger.kernel.org On Fri, 10 Jan 2014, Prarit Bhargava wrote: > kdump uses memmap=exactmap and mem=X values to configure the memory > mapping for the kdump kernel. If memory is hotadded during the boot of > the kdump kernel it is possible that the page tables for the new memory > cause the kdump kernel to run out of memory. > > Since the user has specified a specific mapping ACPI Memory Hotplug should be > disabled in this case. I'll ask just in case: Is it possible to want memory hotplug in spite of using memmap=exactmap or mem=X? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prarit Bhargava Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Sun, 12 Jan 2014 18:46:42 -0500 Message-ID: <52D32962.5050908@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: owner-linux-mm@kvack.org To: 7eggert@gmx.de Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org List-Id: linux-acpi@vger.kernel.org On 01/11/2014 11:35 AM, 7eggert@gmx.de wrote: > > > On Fri, 10 Jan 2014, Prarit Bhargava wrote: > >> kdump uses memmap=exactmap and mem=X values to configure the memory >> mapping for the kdump kernel. If memory is hotadded during the boot of >> the kdump kernel it is possible that the page tables for the new memory >> cause the kdump kernel to run out of memory. >> >> Since the user has specified a specific mapping ACPI Memory Hotplug should be >> disabled in this case. > > I'll ask just in case: Is it possible to want memory hotplug in spite of > using memmap=exactmap or mem=X? Good question -- I can't think of a case. When a user specifies "memmap" or "mem" IMO they are asking for a very specific memory configuration. Having extra memory added above what the user has specified seems to defeat the purpose of "memmap" and "mem". P. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: KOSAKI Motohiro Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Mon, 13 Jan 2014 15:31:04 -0500 Message-ID: References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: In-Reply-To: <52D32962.5050908@redhat.com> Sender: owner-linux-mm@kvack.org To: Prarit Bhargava Cc: Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" List-Id: linux-acpi@vger.kernel.org On Sun, Jan 12, 2014 at 6:46 PM, Prarit Bhargava wrote: > > > On 01/11/2014 11:35 AM, 7eggert@gmx.de wrote: >> >> >> On Fri, 10 Jan 2014, Prarit Bhargava wrote: >> >>> kdump uses memmap=exactmap and mem=X values to configure the memory >>> mapping for the kdump kernel. If memory is hotadded during the boot of >>> the kdump kernel it is possible that the page tables for the new memory >>> cause the kdump kernel to run out of memory. >>> >>> Since the user has specified a specific mapping ACPI Memory Hotplug should be >>> disabled in this case. >> >> I'll ask just in case: Is it possible to want memory hotplug in spite of >> using memmap=exactmap or mem=X? > > Good question -- I can't think of a case. When a user specifies "memmap" or > "mem" IMO they are asking for a very specific memory configuration. Having > extra memory added above what the user has specified seems to defeat the purpose > of "memmap" and "mem". May be yes, may be no. They are often used for a wrokaround to avoid broken firmware issue. If we have no way to explicitly enable hotplug. We will lose a workaround. Perhaps, there is no matter. Today, memory hotplug is only used on high-end machine and their firmware is carefully developped and don't have a serious issue almostly. Though. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prarit Bhargava Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Mon, 13 Jan 2014 18:39:42 -0500 Message-ID: <52D4793E.8070102@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: owner-linux-mm@kvack.org To: KOSAKI Motohiro Cc: Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" List-Id: linux-acpi@vger.kernel.org On 01/13/2014 03:31 PM, KOSAKI Motohiro wrote: > On Sun, Jan 12, 2014 at 6:46 PM, Prarit Bhargava wrote: >> >> >> On 01/11/2014 11:35 AM, 7eggert@gmx.de wrote: >>> >>> >>> On Fri, 10 Jan 2014, Prarit Bhargava wrote: >>> >>>> kdump uses memmap=exactmap and mem=X values to configure the memory >>>> mapping for the kdump kernel. If memory is hotadded during the boot of >>>> the kdump kernel it is possible that the page tables for the new memory >>>> cause the kdump kernel to run out of memory. >>>> >>>> Since the user has specified a specific mapping ACPI Memory Hotplug should be >>>> disabled in this case. >>> >>> I'll ask just in case: Is it possible to want memory hotplug in spite of >>> using memmap=exactmap or mem=X? >> >> Good question -- I can't think of a case. When a user specifies "memmap" or >> "mem" IMO they are asking for a very specific memory configuration. Having >> extra memory added above what the user has specified seems to defeat the purpose >> of "memmap" and "mem". > > May be yes, may be no. > > They are often used for a wrokaround to avoid broken firmware issue. > If we have no way > to explicitly enable hotplug. We will lose a workaround. > > Perhaps, there is no matter. Today, memory hotplug is only used on > high-end machine > and their firmware is carefully developped and don't have a serious > issue almostly. Though. Oof -- sorry Kosaki :( I didn't see this until just now (and your subsequent ACK on the updated patch). I just remembered that we did have a processor vendor's whitebox that would not boot unless we specified a specific memmap and we did specify memmap=exactmap to boot the system correctly and the system had hotplug memory. So it means that I should not key off of "memmap=exactmap". I will self-NAK the updated patch and submit a new one. P. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Mon, 13 Jan 2014 17:33:52 -0700 Message-ID: <1389659632.1792.247.camel@misato.fc.hp.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52D4793E.8070102@redhat.com> Sender: owner-linux-mm@kvack.org To: Prarit Bhargava Cc: KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" List-Id: linux-acpi@vger.kernel.org On Mon, 2014-01-13 at 18:39 -0500, Prarit Bhargava wrote: > > On 01/13/2014 03:31 PM, KOSAKI Motohiro wrote: > > On Sun, Jan 12, 2014 at 6:46 PM, Prarit Bhargava wrote: > >> > >> > >> On 01/11/2014 11:35 AM, 7eggert@gmx.de wrote: > >>> > >>> > >>> On Fri, 10 Jan 2014, Prarit Bhargava wrote: > >>> > >>>> kdump uses memmap=exactmap and mem=X values to configure the memory > >>>> mapping for the kdump kernel. If memory is hotadded during the boot of > >>>> the kdump kernel it is possible that the page tables for the new memory > >>>> cause the kdump kernel to run out of memory. > >>>> > >>>> Since the user has specified a specific mapping ACPI Memory Hotplug should be > >>>> disabled in this case. > >>> > >>> I'll ask just in case: Is it possible to want memory hotplug in spite of > >>> using memmap=exactmap or mem=X? > >> > >> Good question -- I can't think of a case. When a user specifies "memmap" or > >> "mem" IMO they are asking for a very specific memory configuration. Having > >> extra memory added above what the user has specified seems to defeat the purpose > >> of "memmap" and "mem". > > > > May be yes, may be no. > > > > They are often used for a wrokaround to avoid broken firmware issue. > > If we have no way > > to explicitly enable hotplug. We will lose a workaround. > > > > Perhaps, there is no matter. Today, memory hotplug is only used on > > high-end machine > > and their firmware is carefully developped and don't have a serious > > issue almostly. Though. > > Oof -- sorry Kosaki :( I didn't see this until just now (and your subsequent > ACK on the updated patch). > > I just remembered that we did have a processor vendor's whitebox that would not > boot unless we specified a specific memmap and we did specify memmap=exactmap to > boot the system correctly and the system had hotplug memory. > > So it means that I should not key off of "memmap=exactmap". I do not think it makes sense. You needed memmap=exactmap as a workaround because the kernel did not boot with the firmware's memory info. So, it's broken, and you requested the kernel to ignore the firmware info. Why do you think memory hotplug needs to be supported under such condition, which has to use the broken firmware info? Thanks, -Toshi -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Mon, 13 Jan 2014 16:53:49 -0800 Message-ID: <52D48A9D.7000003@zytor.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1389659632.1792.247.camel@misato.fc.hp.com> Sender: owner-linux-mm@kvack.org To: Toshi Kani , Prarit Bhargava Cc: KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" List-Id: linux-acpi@vger.kernel.org On 01/13/2014 04:33 PM, Toshi Kani wrote: > > I do not think it makes sense. You needed memmap=exactmap as a > workaround because the kernel did not boot with the firmware's memory > info. So, it's broken, and you requested the kernel to ignore the > firmware info. > > Why do you think memory hotplug needs to be supported under such > condition, which has to use the broken firmware info? > Even more than memory hotplug: what do we do with NUMA? Since we have already told the kernel "the firmware is bogus" it would seem that any NUMA optimizations would be a bit ... cantankerous at best, no? -hpa -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Mon, 13 Jan 2014 18:09:06 -0700 Message-ID: <1389661746.1792.254.camel@misato.fc.hp.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> <52D48A9D.7000003@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from g1t0027.austin.hp.com ([15.216.28.34]:34098 "EHLO g1t0027.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752570AbaANBPG (ORCPT ); Mon, 13 Jan 2014 20:15:06 -0500 In-Reply-To: <52D48A9D.7000003@zytor.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "H. Peter Anvin" Cc: Prarit Bhargava , KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" On Mon, 2014-01-13 at 16:53 -0800, H. Peter Anvin wrote: > On 01/13/2014 04:33 PM, Toshi Kani wrote: > > > > I do not think it makes sense. You needed memmap=exactmap as a > > workaround because the kernel did not boot with the firmware's memory > > info. So, it's broken, and you requested the kernel to ignore the > > firmware info. > > > > Why do you think memory hotplug needs to be supported under such > > condition, which has to use the broken firmware info? > > > > Even more than memory hotplug: what do we do with NUMA? Since we have > already told the kernel "the firmware is bogus" it would seem that any > NUMA optimizations would be a bit ... cantankerous at best, no? Agreed that NUMA info can be bogus in this case, but is probably not critical. In majority of the cases, memmap=exactmap is used for kdump and the firmware info is sane. So, I think we should keep NUMA enabled since it could be useful when multiple CPUs are enabled for kdump. Thanks, -Toshi From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Mon, 13 Jan 2014 17:29:43 -0800 Message-ID: <52D49307.3040406@zytor.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> <52D48A9D.7000003@zytor.com> <1389661746.1792.254.camel@misato.fc.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1389661746.1792.254.camel@misato.fc.hp.com> Sender: owner-linux-mm@kvack.org To: Toshi Kani Cc: Prarit Bhargava , KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" List-Id: linux-acpi@vger.kernel.org On 01/13/2014 05:09 PM, Toshi Kani wrote: > > In majority of the cases, memmap=exactmap is used for kdump and the > firmware info is sane. So, I think we should keep NUMA enabled since it > could be useful when multiple CPUs are enabled for kdump. > Rather unlikely since all of the kdump memory is likely to sit in a single node. -hpa -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Mon, 13 Jan 2014 18:40:14 -0700 Message-ID: <1389663614.1792.267.camel@misato.fc.hp.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> <52D48A9D.7000003@zytor.com> <1389661746.1792.254.camel@misato.fc.hp.com> <52D49307.3040406@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52D49307.3040406@zytor.com> Sender: owner-linux-mm@kvack.org To: "H. Peter Anvin" Cc: Prarit Bhargava , KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" List-Id: linux-acpi@vger.kernel.org On Mon, 2014-01-13 at 17:29 -0800, H. Peter Anvin wrote: > On 01/13/2014 05:09 PM, Toshi Kani wrote: > > > > In majority of the cases, memmap=exactmap is used for kdump and the > > firmware info is sane. So, I think we should keep NUMA enabled since it > > could be useful when multiple CPUs are enabled for kdump. > > > > Rather unlikely since all of the kdump memory is likely to sit in a > single node. Right, but CPUs are distributed into multiple nodes, which dump the 1st kernel's memory. So, these CPUs should dump their local memory ranges. Thanks, -Toshi -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Young Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Tue, 14 Jan 2014 09:52:02 +0800 Message-ID: <20140114015202.GD4327@dhcp-16-126.nay.redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> <52D48A9D.7000003@zytor.com> <1389661746.1792.254.camel@misato.fc.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1389661746.1792.254.camel@misato.fc.hp.com> Sender: owner-linux-mm@kvack.org To: Toshi Kani Cc: "H. Peter Anvin" , Prarit Bhargava , KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , linux-acpi@vger.kernel.org, "linux-mm@kvack.org" List-Id: linux-acpi@vger.kernel.org On 01/13/14 at 06:09pm, Toshi Kani wrote: > On Mon, 2014-01-13 at 16:53 -0800, H. Peter Anvin wrote: > > On 01/13/2014 04:33 PM, Toshi Kani wrote: > > > > > > I do not think it makes sense. You needed memmap=exactmap as a > > > workaround because the kernel did not boot with the firmware's memory > > > info. So, it's broken, and you requested the kernel to ignore the > > > firmware info. > > > > > > Why do you think memory hotplug needs to be supported under such > > > condition, which has to use the broken firmware info? > > > > > > > Even more than memory hotplug: what do we do with NUMA? Since we have > > already told the kernel "the firmware is bogus" it would seem that any > > NUMA optimizations would be a bit ... cantankerous at best, no? > > Agreed that NUMA info can be bogus in this case, but is probably not > critical. > > In majority of the cases, memmap=exactmap is used for kdump and the > firmware info is sane. So, I think we should keep NUMA enabled since it > could be useful when multiple CPUs are enabled for kdump. In Fedora kdump, we by default add numa=off to 2nd kernel cmdline because enabling numa will use a lot more memory, at the same time we have only 128M reserved by default.. Thanks Dave -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Mon, 13 Jan 2014 18:47:35 -0700 Message-ID: <1389664055.1792.269.camel@misato.fc.hp.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> <52D48A9D.7000003@zytor.com> <1389661746.1792.254.camel@misato.fc.hp.com> <20140114015202.GD4327@dhcp-16-126.nay.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140114015202.GD4327@dhcp-16-126.nay.redhat.com> Sender: owner-linux-mm@kvack.org To: Dave Young Cc: "H. Peter Anvin" , Prarit Bhargava , KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , linux-acpi@vger.kernel.org, "linux-mm@kvack.org" List-Id: linux-acpi@vger.kernel.org On Tue, 2014-01-14 at 09:52 +0800, Dave Young wrote: > On 01/13/14 at 06:09pm, Toshi Kani wrote: > > On Mon, 2014-01-13 at 16:53 -0800, H. Peter Anvin wrote: > > > On 01/13/2014 04:33 PM, Toshi Kani wrote: > > > > > > > > I do not think it makes sense. You needed memmap=exactmap as a > > > > workaround because the kernel did not boot with the firmware's memory > > > > info. So, it's broken, and you requested the kernel to ignore the > > > > firmware info. > > > > > > > > Why do you think memory hotplug needs to be supported under such > > > > condition, which has to use the broken firmware info? > > > > > > > > > > Even more than memory hotplug: what do we do with NUMA? Since we have > > > already told the kernel "the firmware is bogus" it would seem that any > > > NUMA optimizations would be a bit ... cantankerous at best, no? > > > > Agreed that NUMA info can be bogus in this case, but is probably not > > critical. > > > > In majority of the cases, memmap=exactmap is used for kdump and the > > firmware info is sane. So, I think we should keep NUMA enabled since it > > could be useful when multiple CPUs are enabled for kdump. > > In Fedora kdump, we by default add numa=off to 2nd kernel cmdline because > enabling numa will use a lot more memory, at the same time we have only 128M > reserved by default.. That quite makes sense as we only enable a single CPU today. Thanks, -Toshi -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Prarit Bhargava Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Tue, 14 Jan 2014 06:02:16 -0500 Message-ID: <52D51938.1090408@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1389659632.1792.247.camel@misato.fc.hp.com> Sender: owner-linux-mm@kvack.org To: Toshi Kani Cc: KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" List-Id: linux-acpi@vger.kernel.org On 01/13/2014 07:33 PM, Toshi Kani wrote: > On Mon, 2014-01-13 at 18:39 -0500, Prarit Bhargava wrote: >> >> On 01/13/2014 03:31 PM, KOSAKI Motohiro wrote: >>> On Sun, Jan 12, 2014 at 6:46 PM, Prarit Bhargava wrote: >>>> >>>> >>>> On 01/11/2014 11:35 AM, 7eggert@gmx.de wrote: >>>>> >>>>> >>>>> On Fri, 10 Jan 2014, Prarit Bhargava wrote: >>>>> >>>>>> kdump uses memmap=exactmap and mem=X values to configure the memory >>>>>> mapping for the kdump kernel. If memory is hotadded during the boot of >>>>>> the kdump kernel it is possible that the page tables for the new memory >>>>>> cause the kdump kernel to run out of memory. >>>>>> >>>>>> Since the user has specified a specific mapping ACPI Memory Hotplug should be >>>>>> disabled in this case. >>>>> >>>>> I'll ask just in case: Is it possible to want memory hotplug in spite of >>>>> using memmap=exactmap or mem=X? >>>> >>>> Good question -- I can't think of a case. When a user specifies "memmap" or >>>> "mem" IMO they are asking for a very specific memory configuration. Having >>>> extra memory added above what the user has specified seems to defeat the purpose >>>> of "memmap" and "mem". >>> >>> May be yes, may be no. >>> >>> They are often used for a wrokaround to avoid broken firmware issue. >>> If we have no way >>> to explicitly enable hotplug. We will lose a workaround. >>> >>> Perhaps, there is no matter. Today, memory hotplug is only used on >>> high-end machine >>> and their firmware is carefully developped and don't have a serious >>> issue almostly. Though. >> >> Oof -- sorry Kosaki :( I didn't see this until just now (and your subsequent >> ACK on the updated patch). >> >> I just remembered that we did have a processor vendor's whitebox that would not >> boot unless we specified a specific memmap and we did specify memmap=exactmap to >> boot the system correctly and the system had hotplug memory. >> >> So it means that I should not key off of "memmap=exactmap". > > I do not think it makes sense. You needed memmap=exactmap as a > workaround because the kernel did not boot with the firmware's memory > info. So, it's broken, and you requested the kernel to ignore the > firmware info. > > Why do you think memory hotplug needs to be supported under such > condition, which has to use the broken firmware info? There was a memory address region that was not in the e820 map that had to be reserved for a specific device's use. It was not so we used memmap=exactmap and other memmap entries to "rewrite" the e820 map to see if the system would boot; then I filed a bug against the hardware vendor ;) So, yes, in that case I did want memory hotplug & memmap=exactmap. Admittedly this was a rare corner case, and I certainly could have recompiled the kernel. P. > > Thanks, > -Toshi > > > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by kanga.kvack.org (Postfix) with ESMTP id C43CE6B0031 for ; Mon, 13 Jan 2014 20:15:08 -0500 (EST) Received: by mail-pd0-f179.google.com with SMTP id y10so1150211pdj.38 for ; Mon, 13 Jan 2014 17:15:08 -0800 (PST) Received: from g1t0027.austin.hp.com (g1t0027.austin.hp.com. [15.216.28.34]) by mx.google.com with ESMTPS id sa6si17211452pbb.323.2014.01.13.17.15.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 13 Jan 2014 17:15:07 -0800 (PST) Message-ID: <1389661746.1792.254.camel@misato.fc.hp.com> Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] From: Toshi Kani Date: Mon, 13 Jan 2014 18:09:06 -0700 In-Reply-To: <52D48A9D.7000003@zytor.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> <52D48A9D.7000003@zytor.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: "H. Peter Anvin" Cc: Prarit Bhargava , KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" On Mon, 2014-01-13 at 16:53 -0800, H. Peter Anvin wrote: > On 01/13/2014 04:33 PM, Toshi Kani wrote: > > > > I do not think it makes sense. You needed memmap=exactmap as a > > workaround because the kernel did not boot with the firmware's memory > > info. So, it's broken, and you requested the kernel to ignore the > > firmware info. > > > > Why do you think memory hotplug needs to be supported under such > > condition, which has to use the broken firmware info? > > > > Even more than memory hotplug: what do we do with NUMA? Since we have > already told the kernel "the firmware is bogus" it would seem that any > NUMA optimizations would be a bit ... cantankerous at best, no? Agreed that NUMA info can be bogus in this case, but is probably not critical. In majority of the cases, memmap=exactmap is used for kdump and the firmware info is sane. So, I think we should keep NUMA enabled since it could be useful when multiple CPUs are enabled for kdump. Thanks, -Toshi -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757685AbaAJTFh (ORCPT ); Fri, 10 Jan 2014 14:05:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37717 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753182AbaAJTFb (ORCPT ); Fri, 10 Jan 2014 14:05:31 -0500 From: Prarit Bhargava To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 1/2] acpi memory hotplug, add parameter to disable memory hotplug [v2] Date: Fri, 10 Jan 2014 14:04:57 -0500 Message-Id: <1389380698-19361-3-git-send-email-prarit@redhat.com> In-Reply-To: <1389380698-19361-1-git-send-email-prarit@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When booting a kexec/kdump kernel on a system that has specific memory hotplug regions the boot will fail with warnings like: [ 2.939467] swapper/0: page allocation failure: order:9, mode:0x84d0 [ 2.946564] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.0-65.el7.x86_64 #1 [ 2.954532] Hardware name: QCI QSSC-S4R/QSSC-S4R, BIOS QSSC-S4R.QCI.01.00.S013.032920111005 03/29/2011 [ 2.964926] 0000000000000000 ffff8800341bd8c8 ffffffff815bcc67 ffff8800341bd950 [ 2.973224] ffffffff8113b1a0 ffff880036339b00 0000000000000009 00000000000084d0 [ 2.981523] ffff8800341bd950 ffffffff815b87ee 0000000000000000 0000000000000200 [ 2.989821] Call Trace: [ 2.992560] [] dump_stack+0x19/0x1b [ 2.998300] [] warn_alloc_failed+0xf0/0x160 [ 3.004817] [] ? __alloc_pages_direct_compact+0xac/0x196 [ 3.012594] [] __alloc_pages_nodemask+0x7ff/0xa00 [ 3.019692] [] vmemmap_alloc_block+0x62/0xba [ 3.026303] [] vmemmap_alloc_block_buf+0x15/0x3b [ 3.033302] [] vmemmap_populate+0xb4/0x21b [ 3.039718] [] sparse_mem_map_populate+0x27/0x35 [ 3.046717] [] sparse_add_one_section+0x7a/0x185 [ 3.053720] [] __add_pages+0xaf/0x240 [ 3.059656] [] arch_add_memory+0x59/0xd0 [ 3.065877] [] add_memory+0xb9/0x1b0 [ 3.071713] [] acpi_memory_device_add+0x18d/0x26d [ 3.078813] [] acpi_bus_device_attach+0x7d/0xcd [ 3.085719] [] acpi_ns_walk_namespace+0xc8/0x17f [ 3.092716] [] ? acpi_bus_type_and_status+0x90/0x90 [ 3.100004] [] ? acpi_bus_type_and_status+0x90/0x90 [ 3.107293] [] acpi_walk_namespace+0x95/0xc5 [ 3.113904] [] acpi_bus_scan+0x8b/0x9d [ 3.119933] [] acpi_scan_init+0x63/0x160 [ 3.126153] [] acpi_init+0x25d/0x2a6 [ 3.131987] [] ? acpi_sleep_proc_init+0x2a/0x2a [ 3.138889] [] do_one_initcall+0xe2/0x190 [ 3.145210] [] kernel_init_freeable+0x17c/0x207 [ 3.152111] [] ? do_early_param+0x88/0x88 [ 3.158430] [] ? rest_init+0x80/0x80 [ 3.164264] [] kernel_init+0xe/0x180 [ 3.170097] [] ret_from_fork+0x7c/0xb0 [ 3.176123] [] ? rest_init+0x80/0x80 [ 3.181956] Mem-Info: [ 3.184490] Node 0 DMA per-cpu: [ 3.188007] CPU 0: hi: 0, btch: 1 usd: 0 [ 3.193353] Node 0 DMA32 per-cpu: [ 3.197060] CPU 0: hi: 42, btch: 7 usd: 0 [ 3.202410] active_anon:0 inactive_anon:0 isolated_anon:0 [ 3.202410] active_file:0 inactive_file:0 isolated_file:0 [ 3.202410] unevictable:0 dirty:0 writeback:0 unstable:0 [ 3.202410] free:872 slab_reclaimable:13 slab_unreclaimable:1880 [ 3.202410] mapped:0 shmem:0 pagetables:0 bounce:0 [ 3.202410] free_cma:0 because the system has run out of memory at boot time. This occurs because of the following sequence in the boot: Main kernel boots and sets E820 map. The second kernel is booted with a map generated by the kdump service using memmap= and memmap=exactmap. These parameters are added to the kernel parameters of the kexec/kdump kernel. The kexec/kdump kernel has limited memory resources so as not to severely impact the main kernel. The system then panics and the kdump/kexec kernel boots (which is a completely new kernel boot). During this boot ACPI is initialized and the kernel (as can be seen above) traverses the ACPI namespace and finds an entry for a memory device to be hotadded. ie) [ 3.053720] [] __add_pages+0xaf/0x240 [ 3.059656] [] arch_add_memory+0x59/0xd0 [ 3.065877] [] add_memory+0xb9/0x1b0 [ 3.071713] [] acpi_memory_device_add+0x18d/0x26d [ 3.078813] [] acpi_bus_device_attach+0x7d/0xcd [ 3.085719] [] acpi_ns_walk_namespace+0xc8/0x17f [ 3.092716] [] ? acpi_bus_type_and_status+0x90/0x90 [ 3.100004] [] ? acpi_bus_type_and_status+0x90/0x90 [ 3.107293] [] acpi_walk_namespace+0x95/0xc5 [ 3.113904] [] acpi_bus_scan+0x8b/0x9d [ 3.119933] [] acpi_scan_init+0x63/0x160 [ 3.126153] [] acpi_init+0x25d/0x2a6 At this point the kernel adds page table information and the the kexec/kdump kernel runs out of memory. This can also be reproduced by using the memmap=exactmap and mem=X parameters on the main kernel and booting. This patchset resolves the problem by adding a kernel parameter, acpi_no_memhotplug, to disable ACPI memory hotplug. [v2]: changed acpi_no_memhotplug to bool Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Linn Crosetto Cc: Pekka Enberg Cc: Yinghai Lu Cc: Andrew Morton Cc: Toshi Kani Cc: Tang Chen Cc: Wen Congyang Cc: Vivek Goyal Cc: kosaki.motohiro@gmail.com Cc: dyoung@redhat.com Cc: Toshi Kani Cc: linux-acpi@vger.kernel.org Cc: linux-mm@kvack.org --- Documentation/kernel-parameters.txt | 3 +++ drivers/acpi/acpi_memhotplug.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b9e9bd8..41374f9 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -2117,6 +2117,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. nomce [X86-32] Machine Check Exception + acpi_no_memhotplug [ACPI] Disable memory hotplug. Useful for kexec + and kdump kernels. + nomfgpt [X86-32] Disable Multi-Function General Purpose Timer usage (for AMD Geode machines). diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 551dad7..4a0fa94 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -361,7 +361,19 @@ static void acpi_memory_device_remove(struct acpi_device *device) acpi_memory_device_free(mem_device); } +static bool acpi_no_memhotplug; + void __init acpi_memory_hotplug_init(void) { + if (acpi_no_memhotplug) + return; + acpi_scan_add_handler_with_hotplug(&memory_device_handler, "memory"); } + +static int __init disable_acpi_memory_hotplug(char *str) +{ + acpi_no_memhotplug = true; + return 1; +} +__setup("acpi_no_memhotplug", disable_acpi_memory_hotplug); -- 1.7.9.3 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755940AbaAJTFf (ORCPT ); Fri, 10 Jan 2014 14:05:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63597 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751483AbaAJTFb (ORCPT ); Fri, 10 Jan 2014 14:05:31 -0500 From: Prarit Bhargava To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Date: Fri, 10 Jan 2014 14:04:58 -0500 Message-Id: <1389380698-19361-4-git-send-email-prarit@redhat.com> In-Reply-To: <1389380698-19361-1-git-send-email-prarit@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kdump uses memmap=exactmap and mem=X values to configure the memory mapping for the kdump kernel. If memory is hotadded during the boot of the kdump kernel it is possible that the page tables for the new memory cause the kdump kernel to run out of memory. Since the user has specified a specific mapping ACPI Memory Hotplug should be disabled in this case. [v2]: really add mem= Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Linn Crosetto Cc: Pekka Enberg Cc: Yinghai Lu Cc: Andrew Morton Cc: Toshi Kani Cc: Tang Chen Cc: Wen Congyang Cc: Vivek Goyal Cc: kosaki.motohiro@gmail.com Cc: dyoung@redhat.com Cc: Toshi Kani Cc: linux-acpi@vger.kernel.org Cc: linux-mm@kvack.org --- arch/x86/kernel/e820.c | 10 +++++++++- drivers/acpi/acpi_memhotplug.c | 7 ++++++- include/linux/memory_hotplug.h | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 174da5f..747f36a 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -834,6 +835,8 @@ static int __init parse_memopt(char *p) return -EINVAL; e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1); + set_acpi_no_memhotplug(); + return 0; } early_param("mem", parse_memopt); @@ -880,15 +883,20 @@ static int __init parse_memmap_one(char *p) return *p == '\0' ? 0 : -EINVAL; } + static int __init parse_memmap_opt(char *str) { + int ret; + while (str) { char *k = strchr(str, ','); if (k) *k++ = 0; - parse_memmap_one(str); + ret = parse_memmap_one(str); + if (!ret) + set_acpi_no_memhotplug(); str = k; } diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 4a0fa94..48b9267 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -363,6 +363,11 @@ static void acpi_memory_device_remove(struct acpi_device *device) static bool acpi_no_memhotplug; +void set_acpi_no_memhotplug(void) +{ + acpi_no_memhotplug = true; +} + void __init acpi_memory_hotplug_init(void) { if (acpi_no_memhotplug) @@ -373,7 +378,7 @@ void __init acpi_memory_hotplug_init(void) static int __init disable_acpi_memory_hotplug(char *str) { - acpi_no_memhotplug = true; + set_acpi_no_memhotplug(); return 1; } __setup("acpi_no_memhotplug", disable_acpi_memory_hotplug); diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 4ca3d95..80f5a23 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -12,6 +12,9 @@ struct pglist_data; struct mem_section; struct memory_block; +/* set flag to disable ACPI memory hotplug */ +extern void set_acpi_no_memhotplug(void); + #ifdef CONFIG_MEMORY_HOTPLUG /* -- 1.7.9.3 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757939AbaAJTGA (ORCPT ); Fri, 10 Jan 2014 14:06:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59222 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753487AbaAJTFb (ORCPT ); Fri, 10 Jan 2014 14:05:31 -0500 From: Prarit Bhargava To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/2] Add option to disable ACPI Memory Hotplug [v2] Date: Fri, 10 Jan 2014 14:04:55 -0500 Message-Id: <1389380698-19361-1-git-send-email-prarit@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds the ability for the user to disable ACPI Memory Hotplug by adding "acpi_no_memhotplug" as a kernel paramaeter, and disables ACPI Memory Hotplug by default when the memmap=exactmap and mem=X parameters are used. Signed-off-by: Prarit Bhargava Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Len Brown Cc: "Rafael J. Wysocki" Cc: Linn Crosetto Cc: Pekka Enberg Cc: Yinghai Lu Cc: Andrew Morton Cc: Toshi Kani Cc: Tang Chen Cc: Wen Congyang Cc: Vivek Goyal Cc: kosaki.motohiro@gmail.com Cc: dyoung@redhat.com Cc: Toshi Kani Cc: linux-acpi@vger.kernel.org Cc: linux-mm@kvack.org Prarit Bhargava (2): acpi memory hotplug, add parameter to disable memory hotplug [v2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Documentation/kernel-parameters.txt | 3 +++ arch/x86/kernel/e820.c | 10 +++++++++- drivers/acpi/acpi_memhotplug.c | 17 +++++++++++++++++ include/linux/memory_hotplug.h | 3 +++ 4 files changed, 32 insertions(+), 1 deletion(-) -- 1.7.9.3 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758007AbaAJVMY (ORCPT ); Fri, 10 Jan 2014 16:12:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51796 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983AbaAJVMV (ORCPT ); Fri, 10 Jan 2014 16:12:21 -0500 Date: Fri, 10 Jan 2014 16:12:04 -0500 From: Vivek Goyal To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Message-ID: <20140110211204.GC19115@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1389380698-19361-4-git-send-email-prarit@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 10, 2014 at 02:04:58PM -0500, Prarit Bhargava wrote: > kdump uses memmap=exactmap and mem=X values Minor nit. Kdump only uses memmap=exactmap and not mem=X. mem=X is there for debugging. So lets fix the changelog. [..] > static int __init parse_memmap_opt(char *str) > { > + int ret; > + > while (str) { > char *k = strchr(str, ','); > > if (k) > *k++ = 0; > > - parse_memmap_one(str); > + ret = parse_memmap_one(str); > + if (!ret) > + set_acpi_no_memhotplug(); We want to call this only in case of memmap=exactmap and not other memmap= options. So I think instead of here, call it inside parse_memmap_one() where exactmap check is done. if (!strncmp(p, "exactmap", 8)) { set_acpi_no_memhotplug(); } Thanks Vivek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758135AbaAJVkB (ORCPT ); Fri, 10 Jan 2014 16:40:01 -0500 Received: from g4t0017.houston.hp.com ([15.201.24.20]:12211 "EHLO g4t0017.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757951AbaAJVj6 (ORCPT ); Fri, 10 Jan 2014 16:39:58 -0500 Message-ID: <1389389641.1792.173.camel@misato.fc.hp.com> Subject: Re: [PATCH 1/2] acpi memory hotplug, add parameter to disable memory hotplug [v2] From: Toshi Kani To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org Date: Fri, 10 Jan 2014 14:34:01 -0700 In-Reply-To: <1389380698-19361-3-git-send-email-prarit@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-3-git-send-email-prarit@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5 (3.8.5-2.fc19) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2014-01-10 at 14:04 -0500, Prarit Bhargava wrote: : > --- > Documentation/kernel-parameters.txt | 3 +++ > drivers/acpi/acpi_memhotplug.c | 12 ++++++++++++ > 2 files changed, 15 insertions(+) > > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt > index b9e9bd8..41374f9 100644 > --- a/Documentation/kernel-parameters.txt > +++ b/Documentation/kernel-parameters.txt > @@ -2117,6 +2117,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. > > nomce [X86-32] Machine Check Exception > > + acpi_no_memhotplug [ACPI] Disable memory hotplug. Useful for kexec > + and kdump kernels. > + Please move it to where other acpi_xxx are described. For kdump kernel, this option will be used when memmap=exactmap is deprecated. IOW, it is not useful yet. Not sure what you mean by kexec kernel. Memory hotplug does not need to be disabled for kexec reboot. Thanks, -Toshi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758159AbaAJVkr (ORCPT ); Fri, 10 Jan 2014 16:40:47 -0500 Received: from g4t0015.houston.hp.com ([15.201.24.18]:43204 "EHLO g4t0015.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751658AbaAJVko (ORCPT ); Fri, 10 Jan 2014 16:40:44 -0500 Message-ID: <1389389688.1792.174.camel@misato.fc.hp.com> Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] From: Toshi Kani To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org Date: Fri, 10 Jan 2014 14:34:48 -0700 In-Reply-To: <1389380698-19361-4-git-send-email-prarit@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5 (3.8.5-2.fc19) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2014-01-10 at 14:04 -0500, Prarit Bhargava wrote: : > arch/x86/kernel/e820.c | 10 +++++++++- > drivers/acpi/acpi_memhotplug.c | 7 ++++++- > include/linux/memory_hotplug.h | 3 +++ > 3 files changed, 18 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c > index 174da5f..747f36a 100644 > --- a/arch/x86/kernel/e820.c > +++ b/arch/x86/kernel/e820.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -834,6 +835,8 @@ static int __init parse_memopt(char *p) > return -EINVAL; > e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1); > > + set_acpi_no_memhotplug(); > + It won't build when CONFIG_ACPI_HOTPLUG_MEMORY is not defined. Thanks, -Toshi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752778AbaAKQfN (ORCPT ); Sat, 11 Jan 2014 11:35:13 -0500 Received: from mail-in-08.arcor-online.net ([151.189.21.48]:42926 "EHLO mail-in-08.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241AbaAKQfG (ORCPT ); Sat, 11 Jan 2014 11:35:06 -0500 X-Greylist: Passed host: 95.91.230.143 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-03.arcor-online.net E2CC7D8A78 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 X-Greylist: Passed host: 95.91.230.143 Date: Sat, 11 Jan 2014 16:35:00 +0000 (UTC) From: 7eggert@gmx.de To: Prarit Bhargava cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] In-Reply-To: <1389380698-19361-4-git-send-email-prarit@redhat.com> Message-ID: References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 Jan 2014, Prarit Bhargava wrote: > kdump uses memmap=exactmap and mem=X values to configure the memory > mapping for the kdump kernel. If memory is hotadded during the boot of > the kdump kernel it is possible that the page tables for the new memory > cause the kdump kernel to run out of memory. > > Since the user has specified a specific mapping ACPI Memory Hotplug should be > disabled in this case. I'll ask just in case: Is it possible to want memory hotplug in spite of using memmap=exactmap or mem=X? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751179AbaALXrO (ORCPT ); Sun, 12 Jan 2014 18:47:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16190 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbaALXrL (ORCPT ); Sun, 12 Jan 2014 18:47:11 -0500 Message-ID: <52D32962.5050908@redhat.com> Date: Sun, 12 Jan 2014 18:46:42 -0500 From: Prarit Bhargava User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110419 Red Hat/3.1.10-1.el6_0 Thunderbird/3.1.10 MIME-Version: 1.0 To: 7eggert@gmx.de CC: linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , kosaki.motohiro@gmail.com, dyoung@redhat.com, linux-acpi@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/11/2014 11:35 AM, 7eggert@gmx.de wrote: > > > On Fri, 10 Jan 2014, Prarit Bhargava wrote: > >> kdump uses memmap=exactmap and mem=X values to configure the memory >> mapping for the kdump kernel. If memory is hotadded during the boot of >> the kdump kernel it is possible that the page tables for the new memory >> cause the kdump kernel to run out of memory. >> >> Since the user has specified a specific mapping ACPI Memory Hotplug should be >> disabled in this case. > > I'll ask just in case: Is it possible to want memory hotplug in spite of > using memmap=exactmap or mem=X? Good question -- I can't think of a case. When a user specifies "memmap" or "mem" IMO they are asking for a very specific memory configuration. Having extra memory added above what the user has specified seems to defeat the purpose of "memmap" and "mem". P. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752195AbaAMUb3 (ORCPT ); Mon, 13 Jan 2014 15:31:29 -0500 Received: from mail-oa0-f41.google.com ([209.85.219.41]:37346 "EHLO mail-oa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbaAMUbZ (ORCPT ); Mon, 13 Jan 2014 15:31:25 -0500 MIME-Version: 1.0 In-Reply-To: <52D32962.5050908@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> From: KOSAKI Motohiro Date: Mon, 13 Jan 2014 15:31:04 -0500 Message-ID: Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] To: Prarit Bhargava Cc: Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "the arch/x86 maintainers" , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 12, 2014 at 6:46 PM, Prarit Bhargava wrote: > > > On 01/11/2014 11:35 AM, 7eggert@gmx.de wrote: >> >> >> On Fri, 10 Jan 2014, Prarit Bhargava wrote: >> >>> kdump uses memmap=exactmap and mem=X values to configure the memory >>> mapping for the kdump kernel. If memory is hotadded during the boot of >>> the kdump kernel it is possible that the page tables for the new memory >>> cause the kdump kernel to run out of memory. >>> >>> Since the user has specified a specific mapping ACPI Memory Hotplug should be >>> disabled in this case. >> >> I'll ask just in case: Is it possible to want memory hotplug in spite of >> using memmap=exactmap or mem=X? > > Good question -- I can't think of a case. When a user specifies "memmap" or > "mem" IMO they are asking for a very specific memory configuration. Having > extra memory added above what the user has specified seems to defeat the purpose > of "memmap" and "mem". May be yes, may be no. They are often used for a wrokaround to avoid broken firmware issue. If we have no way to explicitly enable hotplug. We will lose a workaround. Perhaps, there is no matter. Today, memory hotplug is only used on high-end machine and their firmware is carefully developped and don't have a serious issue almostly. Though. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752250AbaAMXkT (ORCPT ); Mon, 13 Jan 2014 18:40:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37941 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbaAMXkQ (ORCPT ); Mon, 13 Jan 2014 18:40:16 -0500 Message-ID: <52D4793E.8070102@redhat.com> Date: Mon, 13 Jan 2014 18:39:42 -0500 From: Prarit Bhargava User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110419 Red Hat/3.1.10-1.el6_0 Thunderbird/3.1.10 MIME-Version: 1.0 To: KOSAKI Motohiro CC: Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Toshi Kani , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/13/2014 03:31 PM, KOSAKI Motohiro wrote: > On Sun, Jan 12, 2014 at 6:46 PM, Prarit Bhargava wrote: >> >> >> On 01/11/2014 11:35 AM, 7eggert@gmx.de wrote: >>> >>> >>> On Fri, 10 Jan 2014, Prarit Bhargava wrote: >>> >>>> kdump uses memmap=exactmap and mem=X values to configure the memory >>>> mapping for the kdump kernel. If memory is hotadded during the boot of >>>> the kdump kernel it is possible that the page tables for the new memory >>>> cause the kdump kernel to run out of memory. >>>> >>>> Since the user has specified a specific mapping ACPI Memory Hotplug should be >>>> disabled in this case. >>> >>> I'll ask just in case: Is it possible to want memory hotplug in spite of >>> using memmap=exactmap or mem=X? >> >> Good question -- I can't think of a case. When a user specifies "memmap" or >> "mem" IMO they are asking for a very specific memory configuration. Having >> extra memory added above what the user has specified seems to defeat the purpose >> of "memmap" and "mem". > > May be yes, may be no. > > They are often used for a wrokaround to avoid broken firmware issue. > If we have no way > to explicitly enable hotplug. We will lose a workaround. > > Perhaps, there is no matter. Today, memory hotplug is only used on > high-end machine > and their firmware is carefully developped and don't have a serious > issue almostly. Though. Oof -- sorry Kosaki :( I didn't see this until just now (and your subsequent ACK on the updated patch). I just remembered that we did have a processor vendor's whitebox that would not boot unless we specified a specific memmap and we did specify memmap=exactmap to boot the system correctly and the system had hotplug memory. So it means that I should not key off of "memmap=exactmap". I will self-NAK the updated patch and submit a new one. P. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754685AbaANAj6 (ORCPT ); Mon, 13 Jan 2014 19:39:58 -0500 Received: from g6t0185.atlanta.hp.com ([15.193.32.62]:5249 "EHLO g6t0185.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753365AbaANAjx (ORCPT ); Mon, 13 Jan 2014 19:39:53 -0500 Message-ID: <1389659632.1792.247.camel@misato.fc.hp.com> Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] From: Toshi Kani To: Prarit Bhargava Cc: KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" Date: Mon, 13 Jan 2014 17:33:52 -0700 In-Reply-To: <52D4793E.8070102@redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5 (3.8.5-2.fc19) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2014-01-13 at 18:39 -0500, Prarit Bhargava wrote: > > On 01/13/2014 03:31 PM, KOSAKI Motohiro wrote: > > On Sun, Jan 12, 2014 at 6:46 PM, Prarit Bhargava wrote: > >> > >> > >> On 01/11/2014 11:35 AM, 7eggert@gmx.de wrote: > >>> > >>> > >>> On Fri, 10 Jan 2014, Prarit Bhargava wrote: > >>> > >>>> kdump uses memmap=exactmap and mem=X values to configure the memory > >>>> mapping for the kdump kernel. If memory is hotadded during the boot of > >>>> the kdump kernel it is possible that the page tables for the new memory > >>>> cause the kdump kernel to run out of memory. > >>>> > >>>> Since the user has specified a specific mapping ACPI Memory Hotplug should be > >>>> disabled in this case. > >>> > >>> I'll ask just in case: Is it possible to want memory hotplug in spite of > >>> using memmap=exactmap or mem=X? > >> > >> Good question -- I can't think of a case. When a user specifies "memmap" or > >> "mem" IMO they are asking for a very specific memory configuration. Having > >> extra memory added above what the user has specified seems to defeat the purpose > >> of "memmap" and "mem". > > > > May be yes, may be no. > > > > They are often used for a wrokaround to avoid broken firmware issue. > > If we have no way > > to explicitly enable hotplug. We will lose a workaround. > > > > Perhaps, there is no matter. Today, memory hotplug is only used on > > high-end machine > > and their firmware is carefully developped and don't have a serious > > issue almostly. Though. > > Oof -- sorry Kosaki :( I didn't see this until just now (and your subsequent > ACK on the updated patch). > > I just remembered that we did have a processor vendor's whitebox that would not > boot unless we specified a specific memmap and we did specify memmap=exactmap to > boot the system correctly and the system had hotplug memory. > > So it means that I should not key off of "memmap=exactmap". I do not think it makes sense. You needed memmap=exactmap as a workaround because the kernel did not boot with the firmware's memory info. So, it's broken, and you requested the kernel to ignore the firmware info. Why do you think memory hotplug needs to be supported under such condition, which has to use the broken firmware info? Thanks, -Toshi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754182AbaANAyc (ORCPT ); Mon, 13 Jan 2014 19:54:32 -0500 Received: from terminus.zytor.com ([198.137.202.10]:41144 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753657AbaANAy2 (ORCPT ); Mon, 13 Jan 2014 19:54:28 -0500 Message-ID: <52D48A9D.7000003@zytor.com> Date: Mon, 13 Jan 2014 16:53:49 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Toshi Kani , Prarit Bhargava CC: KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> In-Reply-To: <1389659632.1792.247.camel@misato.fc.hp.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/13/2014 04:33 PM, Toshi Kani wrote: > > I do not think it makes sense. You needed memmap=exactmap as a > workaround because the kernel did not boot with the firmware's memory > info. So, it's broken, and you requested the kernel to ignore the > firmware info. > > Why do you think memory hotplug needs to be supported under such > condition, which has to use the broken firmware info? > Even more than memory hotplug: what do we do with NUMA? Since we have already told the kernel "the firmware is bogus" it would seem that any NUMA optimizations would be a bit ... cantankerous at best, no? -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752771AbaANBaY (ORCPT ); Mon, 13 Jan 2014 20:30:24 -0500 Received: from terminus.zytor.com ([198.137.202.10]:41832 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751682AbaANBaW (ORCPT ); Mon, 13 Jan 2014 20:30:22 -0500 Message-ID: <52D49307.3040406@zytor.com> Date: Mon, 13 Jan 2014 17:29:43 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Toshi Kani CC: Prarit Bhargava , KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> <52D48A9D.7000003@zytor.com> <1389661746.1792.254.camel@misato.fc.hp.com> In-Reply-To: <1389661746.1792.254.camel@misato.fc.hp.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/13/2014 05:09 PM, Toshi Kani wrote: > > In majority of the cases, memmap=exactmap is used for kdump and the > firmware info is sane. So, I think we should keep NUMA enabled since it > could be useful when multiple CPUs are enabled for kdump. > Rather unlikely since all of the kdump memory is likely to sit in a single node. -hpa From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753299AbaANBqT (ORCPT ); Mon, 13 Jan 2014 20:46:19 -0500 Received: from g4t0016.houston.hp.com ([15.201.24.19]:39676 "EHLO g4t0016.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751531AbaANBqP (ORCPT ); Mon, 13 Jan 2014 20:46:15 -0500 Message-ID: <1389663614.1792.267.camel@misato.fc.hp.com> Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] From: Toshi Kani To: "H. Peter Anvin" Cc: Prarit Bhargava , KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" Date: Mon, 13 Jan 2014 18:40:14 -0700 In-Reply-To: <52D49307.3040406@zytor.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> <52D48A9D.7000003@zytor.com> <1389661746.1792.254.camel@misato.fc.hp.com> <52D49307.3040406@zytor.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5 (3.8.5-2.fc19) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2014-01-13 at 17:29 -0800, H. Peter Anvin wrote: > On 01/13/2014 05:09 PM, Toshi Kani wrote: > > > > In majority of the cases, memmap=exactmap is used for kdump and the > > firmware info is sane. So, I think we should keep NUMA enabled since it > > could be useful when multiple CPUs are enabled for kdump. > > > > Rather unlikely since all of the kdump memory is likely to sit in a > single node. Right, but CPUs are distributed into multiple nodes, which dump the 1st kernel's memory. So, these CPUs should dump their local memory ranges. Thanks, -Toshi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753357AbaANBv5 (ORCPT ); Mon, 13 Jan 2014 20:51:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34232 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751259AbaANBvx (ORCPT ); Mon, 13 Jan 2014 20:51:53 -0500 Date: Tue, 14 Jan 2014 09:52:02 +0800 From: Dave Young To: Toshi Kani Cc: "H. Peter Anvin" , Prarit Bhargava , KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , linux-acpi@vger.kernel.org, "linux-mm@kvack.org" Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] Message-ID: <20140114015202.GD4327@dhcp-16-126.nay.redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> <52D48A9D.7000003@zytor.com> <1389661746.1792.254.camel@misato.fc.hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1389661746.1792.254.camel@misato.fc.hp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/13/14 at 06:09pm, Toshi Kani wrote: > On Mon, 2014-01-13 at 16:53 -0800, H. Peter Anvin wrote: > > On 01/13/2014 04:33 PM, Toshi Kani wrote: > > > > > > I do not think it makes sense. You needed memmap=exactmap as a > > > workaround because the kernel did not boot with the firmware's memory > > > info. So, it's broken, and you requested the kernel to ignore the > > > firmware info. > > > > > > Why do you think memory hotplug needs to be supported under such > > > condition, which has to use the broken firmware info? > > > > > > > Even more than memory hotplug: what do we do with NUMA? Since we have > > already told the kernel "the firmware is bogus" it would seem that any > > NUMA optimizations would be a bit ... cantankerous at best, no? > > Agreed that NUMA info can be bogus in this case, but is probably not > critical. > > In majority of the cases, memmap=exactmap is used for kdump and the > firmware info is sane. So, I think we should keep NUMA enabled since it > could be useful when multiple CPUs are enabled for kdump. In Fedora kdump, we by default add numa=off to 2nd kernel cmdline because enabling numa will use a lot more memory, at the same time we have only 128M reserved by default.. Thanks Dave From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752711AbaANBxj (ORCPT ); Mon, 13 Jan 2014 20:53:39 -0500 Received: from g1t0029.austin.hp.com ([15.216.28.36]:48045 "EHLO g1t0029.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752105AbaANBxg (ORCPT ); Mon, 13 Jan 2014 20:53:36 -0500 Message-ID: <1389664055.1792.269.camel@misato.fc.hp.com> Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] From: Toshi Kani To: Dave Young Cc: "H. Peter Anvin" , Prarit Bhargava , KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , linux-acpi@vger.kernel.org, "linux-mm@kvack.org" Date: Mon, 13 Jan 2014 18:47:35 -0700 In-Reply-To: <20140114015202.GD4327@dhcp-16-126.nay.redhat.com> References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> <52D48A9D.7000003@zytor.com> <1389661746.1792.254.camel@misato.fc.hp.com> <20140114015202.GD4327@dhcp-16-126.nay.redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5 (3.8.5-2.fc19) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2014-01-14 at 09:52 +0800, Dave Young wrote: > On 01/13/14 at 06:09pm, Toshi Kani wrote: > > On Mon, 2014-01-13 at 16:53 -0800, H. Peter Anvin wrote: > > > On 01/13/2014 04:33 PM, Toshi Kani wrote: > > > > > > > > I do not think it makes sense. You needed memmap=exactmap as a > > > > workaround because the kernel did not boot with the firmware's memory > > > > info. So, it's broken, and you requested the kernel to ignore the > > > > firmware info. > > > > > > > > Why do you think memory hotplug needs to be supported under such > > > > condition, which has to use the broken firmware info? > > > > > > > > > > Even more than memory hotplug: what do we do with NUMA? Since we have > > > already told the kernel "the firmware is bogus" it would seem that any > > > NUMA optimizations would be a bit ... cantankerous at best, no? > > > > Agreed that NUMA info can be bogus in this case, but is probably not > > critical. > > > > In majority of the cases, memmap=exactmap is used for kdump and the > > firmware info is sane. So, I think we should keep NUMA enabled since it > > could be useful when multiple CPUs are enabled for kdump. > > In Fedora kdump, we by default add numa=off to 2nd kernel cmdline because > enabling numa will use a lot more memory, at the same time we have only 128M > reserved by default.. That quite makes sense as we only enable a single CPU today. Thanks, -Toshi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751896AbaANLCl (ORCPT ); Tue, 14 Jan 2014 06:02:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47035 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751351AbaANLCf (ORCPT ); Tue, 14 Jan 2014 06:02:35 -0500 Message-ID: <52D51938.1090408@redhat.com> Date: Tue, 14 Jan 2014 06:02:16 -0500 From: Prarit Bhargava User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110419 Red Hat/3.1.10-1.el6_0 Thunderbird/3.1.10 MIME-Version: 1.0 To: Toshi Kani CC: KOSAKI Motohiro , Bodo Eggert <7eggert@gmx.de>, LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , Len Brown , "Rafael J. Wysocki" , Linn Crosetto , Pekka Enberg , Yinghai Lu , Andrew Morton , Tang Chen , Wen Congyang , Vivek Goyal , dyoung@redhat.com, linux-acpi@vger.kernel.org, "linux-mm@kvack.org" Subject: Re: [PATCH 2/2] x86, e820 disable ACPI Memory Hotplug if memory mapping is specified by user [v2] References: <1389380698-19361-1-git-send-email-prarit@redhat.com> <1389380698-19361-4-git-send-email-prarit@redhat.com> <52D32962.5050908@redhat.com> <52D4793E.8070102@redhat.com> <1389659632.1792.247.camel@misato.fc.hp.com> In-Reply-To: <1389659632.1792.247.camel@misato.fc.hp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/13/2014 07:33 PM, Toshi Kani wrote: > On Mon, 2014-01-13 at 18:39 -0500, Prarit Bhargava wrote: >> >> On 01/13/2014 03:31 PM, KOSAKI Motohiro wrote: >>> On Sun, Jan 12, 2014 at 6:46 PM, Prarit Bhargava wrote: >>>> >>>> >>>> On 01/11/2014 11:35 AM, 7eggert@gmx.de wrote: >>>>> >>>>> >>>>> On Fri, 10 Jan 2014, Prarit Bhargava wrote: >>>>> >>>>>> kdump uses memmap=exactmap and mem=X values to configure the memory >>>>>> mapping for the kdump kernel. If memory is hotadded during the boot of >>>>>> the kdump kernel it is possible that the page tables for the new memory >>>>>> cause the kdump kernel to run out of memory. >>>>>> >>>>>> Since the user has specified a specific mapping ACPI Memory Hotplug should be >>>>>> disabled in this case. >>>>> >>>>> I'll ask just in case: Is it possible to want memory hotplug in spite of >>>>> using memmap=exactmap or mem=X? >>>> >>>> Good question -- I can't think of a case. When a user specifies "memmap" or >>>> "mem" IMO they are asking for a very specific memory configuration. Having >>>> extra memory added above what the user has specified seems to defeat the purpose >>>> of "memmap" and "mem". >>> >>> May be yes, may be no. >>> >>> They are often used for a wrokaround to avoid broken firmware issue. >>> If we have no way >>> to explicitly enable hotplug. We will lose a workaround. >>> >>> Perhaps, there is no matter. Today, memory hotplug is only used on >>> high-end machine >>> and their firmware is carefully developped and don't have a serious >>> issue almostly. Though. >> >> Oof -- sorry Kosaki :( I didn't see this until just now (and your subsequent >> ACK on the updated patch). >> >> I just remembered that we did have a processor vendor's whitebox that would not >> boot unless we specified a specific memmap and we did specify memmap=exactmap to >> boot the system correctly and the system had hotplug memory. >> >> So it means that I should not key off of "memmap=exactmap". > > I do not think it makes sense. You needed memmap=exactmap as a > workaround because the kernel did not boot with the firmware's memory > info. So, it's broken, and you requested the kernel to ignore the > firmware info. > > Why do you think memory hotplug needs to be supported under such > condition, which has to use the broken firmware info? There was a memory address region that was not in the e820 map that had to be reserved for a specific device's use. It was not so we used memmap=exactmap and other memmap entries to "rewrite" the e820 map to see if the system would boot; then I filed a bug against the hardware vendor ;) So, yes, in that case I did want memory hotplug & memmap=exactmap. Admittedly this was a rare corner case, and I certainly could have recompiled the kernel. P. > > Thanks, > -Toshi > > >