[PATCH v2 0/8] kdump: reduce vmcore size and capture time
Wandun Chen
chenwandun1 at gmail.com
Wed May 20 02:18:36 PDT 2026
This is v2 of the vmcore size optimization series.
The original v1 [1] contains two parts of work:
- Bug fixes and small cleanups about reserved memory.
- A vmcore size optimization that excludes reserved memory out of
vmcore.
For the convenience of review, I have split it into two independent
patchsets. This patchset focuses on the vmcore size optimization.
Motivation
==========
On SoCs that carve out large firmware-owned reserved memory (GPU
firmware, DSP, modem, camera ISP, NPU, ...), kdump currently dumps
those carveouts as part of system RAM even though their contents are
firmware state that is not useful for kernel crash analysis.
This series excludes /reserved-memory regions from vmcore by default,
and also for /memreserve/ firmware regions. The corresponding kdump
time has decreased, and the vmcore size has become smaller.
v1 --> v2:
1. v1 added an opt-out DT property ('linux,no-dump'). Per Rob's
feedback [2], v2 drop that property and exclude reserve memory
by default.
2. Split some prepared patches from the original patches.
3. Address coding-style comments on patch 5 from Rob.
[1] https://lore.kernel.org/lkml/20260429065831.1510858-1-chenwandun@lixiang.com/
[2] https://lore.kernel.org/lkml/20260506144542.GA2072596-robh@kernel.org/
Wandun Chen (8):
of: reserved_mem: handle NULL name in of_reserved_mem_lookup()
kexec/crash: provide crash_exclude_mem_range() stub when
CONFIG_CRASH_DUMP=n
of: reserved_mem: add dumpable flag to opt-in vmcore
of: reserved_mem: save /memreserve/ entries into the reserved_mem
array
of: reserved_mem: add kdump helpers to exclude non-dumpable regions
arm64: kdump: exclude non-dumpable reserved memory regions from vmcore
riscv: kdump: exclude non-dumpable reserved memory regions from vmcore
loongarch: kdump: exclude non-dumpable reserved memory regions from
vmcore
arch/arm64/kernel/machine_kexec_file.c | 6 ++
arch/loongarch/kernel/machine_kexec_file.c | 6 ++
arch/riscv/kernel/machine_kexec_file.c | 4 +
drivers/of/fdt.c | 5 ++
drivers/of/of_private.h | 2 +
drivers/of/of_reserved_mem.c | 92 +++++++++++++++++++++-
include/linux/crash_core.h | 6 ++
include/linux/of_reserved_mem.h | 15 ++++
kernel/dma/contiguous.c | 1 +
9 files changed, 136 insertions(+), 1 deletion(-)
--
2.43.0
More information about the linux-riscv
mailing list