aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mm_init.c
diff options
context:
space:
mode:
authorMa Wupeng <[email protected]>2024-01-09 04:15:36 +0000
committerAndrew Morton <[email protected]>2024-01-12 23:20:47 +0000
commit7ea6ec4c25294e8bc8788148ef854df92ee8dc5e (patch)
treed8008ff33eaacb7b91f64f2b4672eaeeedb64a70 /mm/mm_init.c
parentkexec: do syscore_shutdown() in kernel_kexec (diff)
downloadkernel-7ea6ec4c25294e8bc8788148ef854df92ee8dc5e.tar.gz
kernel-7ea6ec4c25294e8bc8788148ef854df92ee8dc5e.zip
efi: disable mirror feature during crashkernel
If the system has no mirrored memory or uses crashkernel.high while kernelcore=mirror is enabled on the command line then during crashkernel, there will be limited mirrored memory and this usually leads to OOM. To solve this problem, disable the mirror feature during crashkernel. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ma Wupeng <[email protected]> Acked-by: Mike Rapoport (IBM) <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/mm_init.c')
-rw-r--r--mm/mm_init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 89dc29f1e6c6..2c19f5515e36 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -26,6 +26,7 @@
#include <linux/pgtable.h>
#include <linux/swap.h>
#include <linux/cma.h>
+#include <linux/crash_dump.h>
#include "internal.h"
#include "slab.h"
#include "shuffle.h"
@@ -381,6 +382,11 @@ static void __init find_zone_movable_pfns_for_nodes(void)
goto out;
}
+ if (is_kdump_kernel()) {
+ pr_warn("The system is under kdump, ignore kernelcore=mirror.\n");
+ goto out;
+ }
+
for_each_mem_region(r) {
if (memblock_is_mirror(r))
continue;