From a3181169cd15ae1c342be88975e836b4908c13cf Mon Sep 17 00:00:00 2001 From: Pingfan Liu Date: Jun 15 2022 03:35:06 +0000 Subject: crashkernel: optimize arm64 reserved size if PAGE_SIZE=4k Resolves: bz2041729 Upstream: Fedora Conflict: None commit b92bc6e0a775255e545506cedfa6946a1a104eff Author: Pingfan Liu Date: Mon Jun 13 10:25:26 2022 +0800 crashkernel: optimize arm64 reserved size if PAGE_SIZE=4k On RHEL9 and Fedora, the arm64 platform only supports 4KB page size. the reserved memory size can be aligned to that on x86_64. Introducing a new formula for 4KB on arm64, which bases on x86_64 plus extra 64MB. Signed-off-by: Pingfan Liu Acked-by: Baoquan He Signed-off-by: Pingfan Liu --- diff --git a/kdump-lib.sh b/kdump-lib.sh index 1146ff5..2442ab7 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -850,7 +850,8 @@ kdump_get_arch_recommend_crashkernel() if [[ $_arch == "x86_64" ]] || [[ $_arch == "s390x" ]]; then _ck_cmdline="1G-4G:192M,4G-64G:256M,64G-:512M" elif [[ $_arch == "aarch64" ]]; then - _ck_cmdline="2G-:448M" + # For 4KB page size, the formula is based on x86 plus extra = 64M + _ck_cmdline="1G-4G:256M,4G-64G:320M,64G-:576M" elif [[ $_arch == "ppc64le" ]]; then if [[ $_dump_mode == "fadump" ]]; then _ck_cmdline="4G-16G:768M,16G-64G:1G,64G-128G:2G,128G-1T:4G,1T-2T:6G,2T-4T:12G,4T-8T:20G,8T-16T:36G,16T-32T:64G,32T-64T:128G,64T-:180G"