]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86, acpi, crash, kdump: do reserve_crashkernel() after SRAT is parsed.
authorTang Chen <tangchen@cn.fujitsu.com>
Tue, 5 Nov 2013 05:55:51 +0000 (16:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:55:51 +0000 (16:55 +1100)
Memory reserved for crashkernel could be large.  So we should not allocate
this memory bottom up from the end of kernel image.

When SRAT is parsed, we will be able to know which memory is hotpluggable,
and we can avoid allocating this memory for the kernel.  So reorder
reserve_crashkernel() after SRAT is parsed.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Taku Izumi <izumi.taku@jp.fujitsu.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/kernel/setup.c

index f0de6294b95573bce74a61ff3b6fed04443f434e..b5e350d81a78d76bdb21a34a850e3798c15823e4 100644 (file)
@@ -1120,8 +1120,6 @@ void __init setup_arch(char **cmdline_p)
        acpi_initrd_override((void *)initrd_start, initrd_end - initrd_start);
 #endif
 
-       reserve_crashkernel();
-
        vsmp_init();
 
        io_delay_init();
@@ -1134,6 +1132,13 @@ void __init setup_arch(char **cmdline_p)
        early_acpi_boot_init();
 
        initmem_init();
+
+       /*
+        * Reserve memory for crash kernel after SRAT is parsed so that it
+        * won't consume hotpluggable memory.
+        */
+       reserve_crashkernel();
+
        memblock_find_dma_reserve();
 
 #ifdef CONFIG_KVM_GUEST