Skip to content

[PW_SID:1097880] kdump: reduce vmcore size and capture time#1981

Closed
linux-riscv-bot wants to merge 9 commits into
workflow__riscv__fixesfrom
pw1097880
Closed

[PW_SID:1097880] kdump: reduce vmcore size and capture time#1981
linux-riscv-bot wants to merge 9 commits into
workflow__riscv__fixesfrom
pw1097880

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1097880 applied to workflow__riscv__fixes

Name: kdump: reduce vmcore size and capture time
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1097880
Version: 2

Linux RISC-V bot and others added 9 commits May 14, 2026 08:49
From: Wandun Chen <chenwandun@lixiang.com>

Prepare for an upcoming change that appends /memreserve/ entries to
reserved_mem[]; such entries have no name.

No functional change.

Signed-off-by: Wandun Chen <chenwandun@lixiang.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…_DUMP=n

From: Wandun Chen <chenwandun@lixiang.com>

Prepare for an upcoming change that excludes non-dumpable reserved
regions from the kdump vmcore and will call crash_exclude_mem_range()
from generic, non-arch code.

No functional change.

Signed-off-by: Wandun Chen <chenwandun@lixiang.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
From: Wandun Chen <chenwandun@lixiang.com>

Add a 'dumpable' flag to struct reserved_mem so the kernel can decide
whether a reserved area should be included in the kdump vmcore. Most
reserved regions are owned by devices and do not contain data useful
for kernel crash analysis, so excluding them by default is the right
behaviour.

Reusable CMA regions are different: pages in a CMA region are handed
back to the buddy allocator and may contain key data for crash
analysis, so set dumpable to true in rmem_cma_setup().

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Wandun Chen <chenwandun@lixiang.com>
Tested-by: Meijing Zhao <zhaomeijing@lixiang.com>
Link: https://lore.kernel.org/all/20260506144542.GA2072596-robh@kernel.org/
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
From: Wandun Chen <chenwandun@lixiang.com>

/memreserve/ is used by firmware or bootloaders, such regions hold no
useful data for crash analysis, they should be excluded from the
kdump vmcore, so save /memreserve/ entries into the reserved_mem array
for later exclusion.

If a /memreserve/ entry overlaps any dumpable reserved region, mark
the whole memreserve entry dumpable as well. This may keep slightly
more memory in vmcore than strictly necessary, but avoids splitting
entries and never drops data that may be useful for crash analysis.

Signed-off-by: Wandun Chen <chenwandun@lixiang.com>
Tested-by: Meijing Zhao <zhaomeijing@lixiang.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
From: Wandun Chen <chenwandun@lixiang.com>

Add two helpers to exclude non-dumpable regions for arch-specific
code.

 - of_reserved_mem_kdump_nr_ranges() returns the count of regions
   that are not dumpable. Each excluded region may split an existing
   crash_mem range into two, so callers use this to calculate
   crash_mem allocation size.

 - of_reserved_mem_kdump_exclude() walks reserved_mem[] and calls
   crash_exclude_mem_range() for every non-dumpable region.

Signed-off-by: Wandun Chen <chenwandun@lixiang.com>
Tested-by: Meijing Zhao <zhaomeijing@lixiang.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
From: Wandun Chen <chenwandun@lixiang.com>

Reserved memory regions are excluded from vmcore by default unless
marked dumpable. Honor the dumpable flag to filter out device firmware
regions (e.g., GPU, DSP, modem) reserved via device tree, since they
typically contain data not useful for kernel crash analysis and can
significantly increase vmcore size.

Use of_reserved_mem_kdump_exclude() to perform the exclusion, and
pre-size the crash_mem array via of_reserved_mem_kdump_nr_ranges().

Signed-off-by: Wandun Chen <chenwandun@lixiang.com>
Tested-by: Meijing Zhao <zhaomeijing@lixiang.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
From: Wandun Chen <chenwandun@lixiang.com>

Apply the same non-dumpable reserved memory filtering to RISC-V kdump
as was done for arm64. Use of_reserved_mem_kdump_exclude() to drop
flagged regions from the elfcorehdr PT_LOAD segments, and
of_reserved_mem_kdump_nr_ranges() to pre-size the crash_mem array.

Signed-off-by: Wandun Chen <chenwandun@lixiang.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…mcore

From: Wandun Chen <chenwandun@lixiang.com>

Apply the same non-dumpable reserved memory filtering to LoongArch
kdump as was done for arm64. Use of_reserved_mem_kdump_exclude() to
drop flagged regions from the elfcorehdr PT_LOAD segments, and
of_reserved_mem_kdump_nr_ranges() to pre-size the crash_mem array.

Signed-off-by: Wandun Chen <chenwandun@lixiang.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.47 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1119.82 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1643.14 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.70 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.86 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.61 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 77.76 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.47 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
kdoc
Desc: Detects for kdoc errors
Duration: 0.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[v2,1/8] of: reserved_mem: handle NULL name in of_reserved_mem_lookup()"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.83 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/8] kexec/crash: provide crash_exclude_mem_range() stub when CONFIG_CRASH_DUMP=n"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.94 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/8] kexec/crash: provide crash_exclude_mem_range() stub when CONFIG_CRASH_DUMP=n"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1143.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/8] kexec/crash: provide crash_exclude_mem_range() stub when CONFIG_CRASH_DUMP=n"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1683.07 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/8] kexec/crash: provide crash_exclude_mem_range() stub when CONFIG_CRASH_DUMP=n"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.38 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/8] kexec/crash: provide crash_exclude_mem_range() stub when CONFIG_CRASH_DUMP=n"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.02 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/8] kexec/crash: provide crash_exclude_mem_range() stub when CONFIG_CRASH_DUMP=n"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.61 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/8] kexec/crash: provide crash_exclude_mem_range() stub when CONFIG_CRASH_DUMP=n"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 78.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/8] kexec/crash: provide crash_exclude_mem_range() stub when CONFIG_CRASH_DUMP=n"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[v2,2/8] kexec/crash: provide crash_exclude_mem_range() stub when CONFIG_CRASH_DUMP=n"
kdoc
Desc: Detects for kdoc errors
Duration: 0.70 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v2,6/8] arm64: kdump: exclude non-dumpable reserved memory regions from vmcore"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 1.40 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 6: "[v2,6/8] arm64: kdump: exclude non-dumpable reserved memory regions from vmcore"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 1.04 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 114.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1120.41 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1650.63 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.56 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.89 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.60 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 77.31 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
kdoc
Desc: Detects for kdoc errors
Duration: 0.70 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 7: "[v2,7/8] riscv: kdump: exclude non-dumpable reserved memory regions from vmcore"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 123.19 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1016.61 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1368.51 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 19.50 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 20.82 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.62 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 75.81 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
kdoc
Desc: Detects for kdoc errors
Duration: 0.72 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 8: "[v2,8/8] loongarch: kdump: exclude non-dumpable reserved memory regions from vmcore"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch 2 times, most recently from a1231b7 to c03cdce Compare May 23, 2026 03:29
@linux-riscv-bot linux-riscv-bot deleted the pw1097880 branch May 27, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants