On Mon, Feb 28, 2022 at 10:42 PM Luis Chamberlain <mcgrof@xxxxxxxxxx> wrote: > > On Mon, Feb 28, 2022 at 03:10:22PM +0800, Muchun Song wrote: > > We must add "hugetlb_free_vmemmap=on" to boot cmdline and reboot the > > server to enable the feature of freeing vmemmap pages of HugeTLB > > pages. Rebooting usually taske a long time. Add a sysctl to enable > > the feature at runtime and do not need to reboot. > > > > Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx> > > --- > > Documentation/admin-guide/sysctl/vm.rst | 13 +++++++++++++ > > include/linux/hugetlb.h | 5 +++++ > > include/linux/memory_hotplug.h | 1 + > > kernel/sysctl.c | 11 +++++++++++ > > kernel/sysctl.c is a hot mess with tons of knobs from all over the > place. And so we've been moving these to their own place. For instance > all the filesystem knobs are now properly in fs/. So Adding new ones > to the file is undesirable. If this is going to be added, please add > it somewhere in mm / hugetlb code. > I also have realized this when reading another patch [1]. I will move this into its hugetlb related code. Anyway, thanks for your suggestion. [1] https://lore.kernel.org/linux-fsdevel/20220220060626.15885-1-tangmeng@xxxxxxxxxxxxx/