From de11ebc0b7d9b39cf89840eeed5bfbdd813b4c24 Mon Sep 17 00:00:00 2001 From: Kairui Song Date: May 18 2021 09:19:10 +0000 Subject: Revert "Always set vm.zone_reclaim_mode = 3 in kdump kernel" Resolves: bz1896247 Upstream: fedora Conflict: none commit ee160bf04dfbe207fdec57adf05a98bf9ad8a83a Author: Kairui Song Date: Mon Apr 19 23:00:10 2021 +0800 Revert "Always set vm.zone_reclaim_mode = 3 in kdump kernel" This reverts commit 5633e8331866098c97e72e99f233a254fa479a4d. vm.zone_reclaim_mode may cause trashing on some machines. And after second thought, vm.zone_reclaim_mode is barely helpful for machines with high mem stress, so just revert it. Signed-off-by: Kairui Song Acked-by: Pingfan Liu Signed-off-by: Kairui Song --- diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 09ac8cd..c416368 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -695,18 +695,16 @@ kdump_install_conf() { rm -f ${initdir}/tmp/$$-kdump.conf } -# Remove user custom configurations sysctl.conf & sysctl.d/* -# and apply some optimization for kdump -overwrite_sysctl_conf() { +# Default sysctl parameters should suffice for kdump kernel. +# Remove custom configurations sysctl.conf & sysctl.d/* +remove_sysctl_conf() { + # As custom configurations like vm.min_free_kbytes can lead # to OOM issues in kdump kernel, avoid them rm -f "${initdir}/etc/sysctl.conf" rm -rf "${initdir}/etc/sysctl.d" rm -rf "${initdir}/run/sysctl.d" rm -rf "${initdir}/usr/lib/sysctl.d" - - mkdir -p "${initdir}/etc/sysctl.d" - echo "vm.zone_reclaim_mode = 3" > "${initdir}/etc/sysctl.d/99-zone-reclaim.conf" } kdump_iscsi_get_rec_val() { @@ -997,7 +995,7 @@ kdump_install_systemd_conf() { install() { kdump_module_init kdump_install_conf - overwrite_sysctl_conf + remove_sysctl_conf if is_ssh_dump_target; then kdump_install_random_seed