• C
    arm64: kdump: reimplement crashkernel=X · 70e58636
    Chen Zhou 提交于
    maillist inclusion
    category: feature
    bugzilla: 47954
    Reference: https://lkml.org/lkml/2021/1/30/53
    
    -------------------------------------------------
    
    There are following issues in arm64 kdump:
    1. We use crashkernel=X to reserve crashkernel below 4G, which
    will fail when there is no enough low memory.
    2. If reserving crashkernel above 4G, in this case, crash dump
    kernel will boot failure because there is no low memory available
    for allocation.
    3. Since commit 1a8e1cef ("arm64: use both ZONE_DMA and ZONE_DMA32"),
    if the memory reserved for crash dump kernel falled in ZONE_DMA32,
    the devices in crash dump kernel need to use ZONE_DMA will alloc
    fail.
    
    To solve these issues, change the behavior of crashkernel=X and
    introduce crashkernel=X,[high,low]. crashkernel=X tries low allocation
    in DMA zone or DMA32 zone if CONFIG_ZONE_DMA is disabled, and fall back
    to high allocation if it fails.
    We can also use "crashkernel=X,high" to select a region above DMA zone,
    which also tries to allocate at least 256M in DMA zone automatically
    (or the DMA32 zone if CONFIG_ZONE_DMA is disabled).
    "crashkernel=Y,low" can be used to allocate specified size low memory.
    
    Another minor change, there may be two regions reserved for crash
    dump kernel, in order to distinct from the high region and make no
    effect to the use of existing kexec-tools, rename the low region as
    "Crash kernel (low)".
    Signed-off-by: NChen Zhou <chenzhou10@huawei.com>
    Tested-by: NJohn Donnelly <John.p.donnelly@oracle.com>
    Signed-off-by: NChen Zhou <chenzhou10@huawei.com>
    Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
    Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
    70e58636
kexec.h 3.1 KB