History

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.

Ma Wupeng committed 2 years ago

Commit 7ea6ec41 parent 7bb94381 file · +6 −0Browse files

Unified · Split

mm/mm_init.c+6−0
@@ -26,6 +26,7 @@ · 25 unmodified lines
2626 #include <linux/pgtable.h>
2727 #include <linux/swap.h>
2828 #include <linux/cma.h>
29+#include <linux/crash_dump.h>
2930 #include "internal.h"
3031 #include "slab.h"
3132 #include "shuffle.h"
@@ -381,6 +382,11 @@ static void __init find_zone_movable_pfns_for_nodes(void) · 349 unmodified lines
381382 goto out;
382383 }
383384
385+ if (is_kdump_kernel()) {
386+ pr_warn("The system is under kdump, ignore kernelcore=mirror.\n");
387+ goto out;
388+ }
389+
384390 for_each_mem_region(r) {
385391 if (memblock_is_mirror(r))
386392 continue;