public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] kexec: accumulate and release the size of crashkernel
@ 2022-07-04 11:41 Kaihao Bai
  2022-07-04 11:41 ` [PATCH 1/2] kexec: accumulate kexec_crash_size if crashk_low_res defined Kaihao Bai
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kaihao Bai @ 2022-07-04 11:41 UTC (permalink / raw)
  To: ebiederm; +Cc: kexec, linux-kernel, baolin.wang, carlo.bai

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(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-22 11:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-04 11:41 [PATCH 0/2] kexec: accumulate and release the size of crashkernel Kaihao Bai
2022-07-04 11:41 ` [PATCH 1/2] kexec: accumulate kexec_crash_size if crashk_low_res defined Kaihao Bai
2022-07-04 11:41 ` [PATCH 2/2] kexec: release reserved memory ranges to RAM " Kaihao Bai
2022-07-05  1:56 ` [PATCH 0/2] kexec: accumulate and release the size of crashkernel Baoquan He
2022-07-22 11:37   ` Carlo Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox