Is it worth to fix the crashkernel reserved memory blocks the hotplug issue?

Pingfan Liu kernelfans at gmail.com
Mon Dec 10 15:08:45 AEDT 2018


Hi,
I found in powerpc code, it is doable to reserve memory region in
movable zone, such as crashkernel does. But in x86 code, it checks the
hotpluggable attribute of memory, hence if manually specifying a
region in hotpluggable region, it will fail.
The x86 code:
/* 0 means: find the address automatically */
if (crash_base <= 0) {
/*
* Set CRASH_ADDR_LOW_MAX upper bound for crash memory,
* as old kexec-tools loads bzImage below that, unless
* "crashkernel=size[KMG],high" is specified.
*/
crash_base = memblock_find_in_range(CRASH_ALIGN,
   high ? CRASH_ADDR_HIGH_MAX
: CRASH_ADDR_LOW_MAX,
   crash_size, CRASH_ALIGN);
if (!crash_base) {
pr_info("crashkernel reservation failed - No suitable area found.\n");
return;
}

} else {
unsigned long long start;

start = memblock_find_in_range(crash_base,  --> this func will check
the hotpluggable attribute of memory and return failure if the
specifying region intersects with it.
      crash_base + crash_size,
      crash_size, 1 << 20);
if (start != crash_base) {
pr_info("crashkernel reservation failed - memory is in use.\n");
return;
}
}

Thanks,
Pingfan


More information about the Linuxppc-dev mailing list