android_kernel_motorola_sm6375/arch/powerpc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Pingfan Liu 9b163c9162 powerpc/crashkernel: Take "mem=" option into account
[ Upstream commit be5470e0c285a68dc3afdea965032f5ddc8269d7 ]

'mem=" option is an easy way to put high pressure on memory during
some test. Hence after applying the memory limit, instead of total
mem, the actual usable memory should be considered when reserving mem
for crashkernel. Otherwise the boot up may experience OOM issue.

E.g. it would reserve 4G prior to the change and 512M afterward, if
passing
crashkernel="2G-4G:384M,4G-16G:512M,16G-64G:1G,64G-128G:2G,128G-:4G",
and mem=5G on a 256G machine.

This issue is powerpc specific because it puts higher priority on
fadump and kdump reservation than on "mem=". Referring the following
code:
    if (fadump_reserve_mem() == 0)
            reserve_crashkernel();
    ...
    /* Ensure that total memory size is page-aligned. */
    limit = ALIGN(memory_limit ?: memblock_phys_mem_size(), PAGE_SIZE);
    memblock_enforce_memory_limit(limit);

While on other arches, the effect of "mem=" takes a higher priority
and pass through memblock_phys_mem_size() before calling
reserve_crashkernel().

Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
Reviewed-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1585749644-4148-1-git-send-email-kernelfans@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-24 17:50:18 +02:00
..
boot
configs
crypto
include powerpc/kasan: Fix shadow pages allocation failure 2020-06-22 09:31:23 +02:00
kernel powerpc/crashkernel: Take "mem=" option into account 2020-06-24 17:50:18 +02:00
kvm KVM: PPC: Book3S HV: Fix H_CEDE return code for nested guests 2020-04-23 10:36:32 +02:00
lib
math-emu
mm powerpc/ptdump: Add _PAGE_COHERENT flag 2020-06-24 17:50:16 +02:00
net
oprofile
perf powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run 2020-06-24 17:50:17 +02:00
platforms powerpc/spufs: fix copy_to_user while atomic 2020-06-22 09:31:02 +02:00
purgatory
sysdev powerpc/xive: Clear the page tables for the ESB IO mapping 2020-06-17 16:40:22 +02:00
tools powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00
xmon powerpc/xmon: Restrict when kernel is locked down 2020-06-07 13:18:49 +02:00
Kbuild
Kconfig powerpc/kasan: Fix stack overflow by increasing THREAD_SHIFT 2020-06-24 17:50:12 +02:00
Kconfig.debug
Makefile
Makefile.postlink powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00