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.
Unified · Split
| @@ -26,6 +26,7 @@ · 25 unmodified lines | |||
| 26 | #include <linux/pgtable.h> | 26 | #include <linux/pgtable.h> |
| 27 | #include <linux/swap.h> | 27 | #include <linux/swap.h> |
| 28 | #include <linux/cma.h> | 28 | #include <linux/cma.h> |
| 29 | #include <linux/crash_dump.h> | ||
| 29 | #include "internal.h" | 30 | #include "internal.h" |
| 30 | #include "slab.h" | 31 | #include "slab.h" |
| 31 | #include "shuffle.h" | 32 | #include "shuffle.h" |
| @@ -381,6 +382,11 @@ static void __init find_zone_movable_pfns_for_nodes(void) · 349 unmodified lines | |||
| 381 | goto out; | 382 | goto out; |
| 382 | } | 383 | } |
| 383 | 384 | ||
| 385 | if (is_kdump_kernel()) { | ||
| 386 | pr_warn("The system is under kdump, ignore kernelcore=mirror.\n"); | ||
| 387 | goto out; | ||
| 388 | } | ||
| 389 | |||
| 384 | for_each_mem_region(r) { | 390 | for_each_mem_region(r) { |
| 385 | if (memblock_is_mirror(r)) | 391 | if (memblock_is_mirror(r)) |
| 386 | continue; | 392 | continue; |