Re: [PATCH] hugetlb: Add nohugepages parameter to prevent hugepages creation
From: Qian Cai
Date: Fri Oct 11 2019 - 19:36:22 EST
> On Oct 11, 2019, at 6:40 PM, Guilherme G. Piccoli <gpiccoli@xxxxxxxxxxxxx> wrote:
>
> Kdump kernels won't benefit from hugepages - in fact it's quite opposite,
> it may be the case hugepages on kdump kernel can lead to OOM if kernel
> gets unable to allocate demanded pages due to the fact the preallocated
> hugepages are consuming a lot of memory.
>
> This patch proposes a new kernel parameter to prevent the creation of
> HugeTLB hugepages - we currently don't have a way to do that. We can
> even have kdump scripts removing the kernel command-line options to
> set hugepages, but it's not straightforward to prevent sysctl/sysfs
> configuration, given it happens in later boot or anytime when the
> system is running.
Typically, kdump kernel has its own initramfs, and donât even need to mount a rootfs, so I canât see how sysfs/sysctl is relevant here.