Skip to content

kexec: accumulate and release the size of crashkernel

Kaihao Bai kexec lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2kexec: accumulate kexec_crash_size if crashk_low_res definedkernel/kexec_core.c+2 -00 replies
2/2kexec: release reserved memory ranges to RAM if crashk_low_res definedkernel/kexec_core.c+56 -190 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] kexec: accumulate and release the size of crashkernel

Currently x86 and arm64 support to reserve low memory range for crashkernel. When crashkernel=Y,low is defined, the main kernel would reserve another memblock (instead of crashkernel=X,high, which stored in crashk_res) for crashkernel and store it in crashk_low_res.

The implementations of get_crash_size and crash_shrink_size do not consider the extra reserved memory range if it exists. Thus, firstly accumulate this range on the size of crashkernel and export the size by /sys/kernel/kexec_crash_size.

If getting the input of /sys/kernel/kexec_crash_size, both reserved ranges might be released if the new size is smaller than current size. The order of release is (crashk_res -> crashk_low_res). Only if the new size defined by the user is smaller than the size of low memory range, continue to release the reserved low memory range after completely releasing the high memory range.

Kaihao Bai (2):
kexec: accumulate kexec_crash_size if crashk_low_res defined
kexec: release reserved memory ranges to RAM if crashk_low_res defined

 kernel/kexec_core.c | 77 ++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 58 insertions(+), 19 deletions(-)
Signature · 1 line
1.8.3.1