[PATCH] kdump: fix OOM issue when vm.min_free_kbytes is set too high

Dave Young dyoung at redhat.com
Wed Nov 26 06:38:40 UTC 2014


Hi, Hari

On 11/25/14 at 11:42am, Hari Bathini wrote:
> When the value of vm.min_free_kbytes is set too high in /etc/sysctl.conf,
> kdump kernel fails with OOM. As min_free_kbytes may not be relevant for
> kdump kernel, this patch tries to fix the issue by removing it from the
> file sysctl.conf and thus forcing default value for vm.min_free_kbytes
> parameter.
> 
> Signed-off-by: Hari Bathini <hbathini at linux.vnet.ibm.com>
> ---
>  dracut-module-setup.sh |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
> index dcebc47..6ada7d3 100755
> --- a/dracut-module-setup.sh
> +++ b/dracut-module-setup.sh
> @@ -612,6 +612,11 @@ install() {
>      # Also redirect dracut-emergency to kdump error handler
>      ln_r "$systemdsystemunitdir/emergency.service" "$systemdsystemunitdir/dracut-emergency.service"
>  
> +    # While min_free_kbytes may not be relevant for kdump kernel,
> +    # it leads to OOM in cases where this value is too high.
> +    # Let's be paranoid and force it to default value calculated in kernel.
> +    sed -e "/^$/d" -e "/^#/d" -e "/min_free_kbytes/d" /etc/sysctl.conf > "${initdir}/etc/sysctl.conf"
> +

sysctl vm values are most for normal boot instead of initramfs, so I think
default value should be good. But is there any other way to specify the value
ie. cmdline param instead of hardcode here?


>      # Check for all the devices and if any device is iscsi, bring up iscsi
>      # target. Ideally all this should be pushed into dracut iscsi module
>      # at some point of time.
> 
> _______________________________________________
> kexec mailing list
> kexec at lists.fedoraproject.org
> https://lists.fedoraproject.org/mailman/listinfo/kexec


More information about the kexec mailing list