Add crashkernel bootarg

kernel 5.10 did not support crashkernl=auto, so we need add
crashkernel=512M-2G:64M,2G-8G:256M,8G-16G:512M,16G-32G:1G,32G-:2G
that is a similar to the 'auto' value for the 'crashkernel'.

Story: 2008921
Task: 42872

Depends-On: https://review.opendev.org/c/starlingx/kernel/+/798790

Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
Change-Id: I9a12cf34074490fdfec897126bd9a32c530c36b1
This commit is contained in:
Jiping Ma 2021-07-28 01:18:59 -07:00
parent fc84f13b64
commit 30e5ffd91e
3 changed files with 16 additions and 0 deletions

View File

@ -76,6 +76,12 @@ fi
#KERN_OPTS="${KERN_OPTS} cgroup_disable=memory"
KERN_OPTS="${KERN_OPTS} user_namespace.enable=1"
if [[ ${KERN_OPTS} =~ "crashkernel=auto" ]]; then
KERN_OPTS=${KERN_OPTS/crashkernel=auto/crashkernel=512M-2G:64M,2G-8G:256M,8G-16G:512M,16G-32G:1G,32G-:2G}
else
KERN_OPTS="${KERN_OPTS} crashkernel=512M-2G:64M,2G-8G:256M,8G-16G:512M,16G-32G:1G,32G-:2G"
fi
# Add kernel option to avoid jiffies_lock contention on real-time kernel
if [[ "$subfunction" =~ lowlatency ]]; then
KERN_OPTS="${KERN_OPTS} skew_tick=1"

View File

@ -30,6 +30,11 @@ fi
# k8s updates
#KERN_OPTS="${KERN_OPTS} cgroup_disable=memory"
KERN_OPTS="${KERN_OPTS} user_namespace.enable=1"
if [[ ${KERN_OPTS} =~ "crashkernel=auto" ]]; then
KERN_OPTS=${KERN_OPTS/crashkernel=auto/crashkernel=512M-2G:64M,2G-8G:256M,8G-16G:512M,16G-32G:1G,32G-:2G}
else
KERN_OPTS="${KERN_OPTS} crashkernel=512M-2G:64M,2G-8G:256M,8G-16G:512M,16G-32G:1G,32G-:2G"
fi
# If the installer asked us to use security related kernel params, use
# them in the grub line as well (until they can be configured via puppet)

View File

@ -24,6 +24,11 @@ fi
# k8s updates:
#KERN_OPTS="${KERN_OPTS} cgroup_disable=memory"
KERN_OPTS="${KERN_OPTS} user_namespace.enable=1"
if [[ ${KERN_OPTS} =~ "crashkernel=auto" ]]; then
KERN_OPTS=${KERN_OPTS/crashkernel=auto/crashkernel=512M-2G:64M,2G-8G:256M,8G-16G:512M,16G-32G:1G,32G-:2G}
else
KERN_OPTS="${KERN_OPTS} crashkernel=512M-2G:64M,2G-8G:256M,8G-16G:512M,16G-32G:1G,32G-:2G"
fi
# If the installer asked us to use security related kernel params, use
# them in the grub line as well (until they can be configured via puppet)