linux_dsm_epyc7002/arch/powerpc
Pingfan Liu be5470e0c2 powerpc/crashkernel: Take "mem=" option into account
'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
2020-06-02 20:59:05 +10:00
..
boot powerpc/40x: Remove EP405 2020-05-28 23:24:35 +10:00
configs powerpc/40x: Remove EP405 2020-05-28 23:24:35 +10:00
crypto crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
include hw-breakpoints: Fix build warnings with clang 2020-06-02 20:58:55 +10:00
kernel powerpc/64s/kuap: Conditionally restore AMR in kuap_restore_amr asm 2020-05-28 23:24:37 +10:00
kexec powerpc/crashkernel: Take "mem=" option into account 2020-06-02 20:59:05 +10:00
kvm Merge branch 'topic/ppc-kvm' into next 2020-05-20 23:38:13 +10:00
lib powerpc: Add ppc_inst_as_u64() 2020-05-26 23:36:57 +10:00
math-emu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mm powerpc/40x: Rework 40x PTE access and TLB miss 2020-05-28 23:24:34 +10:00
net treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
oprofile powerpc updates for 5.6 2020-02-04 13:06:46 +00:00
perf powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show processor details 2020-05-28 23:24:39 +10:00
platforms powerpc/pseries: Update hv-24x7 information after migration 2020-05-28 23:24:40 +10:00
purgatory .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
sysdev powerpc/xive: Share the event-queue page with the Hypervisor. 2020-05-28 23:24:40 +10:00
tools powerpc/head_check: Avoid broken pipe 2020-05-19 00:10:35 +10:00
xmon powerpc: Add ppc_inst_next() 2020-05-26 23:36:51 +10:00
Kbuild powerpc/kexec: Move kexec files into a dedicated subdir. 2019-11-21 15:41:34 +11:00
Kconfig Merge branch 'fixes' into next 2020-05-26 22:56:03 +10:00
Kconfig.debug powerpc: Remove Xilinx PPC405/PPC440 support 2020-05-28 23:24:34 +10:00
Makefile powerpc: Suppress .eh_frame generation 2020-04-01 14:30:51 +11:00
Makefile.postlink powerpc: Do not consider weak unresolved symbol relocations as bad 2020-01-31 20:17:22 +11:00