Re: [PATCH] mm: shmem/tmpfs hugepage defaults config choice
From: Dmitry Ilvokhin
Date: Mon Oct 27 2025 - 11:11:50 EST
On Fri, Oct 24, 2025 at 09:27:39PM +0100, Pedro Falcato wrote:
> On Thu, Oct 23, 2025 at 06:12:02PM +0000, Dmitry Ilvokhin wrote:
> > Allow to override defaults for shemem and tmpfs at config time. This is
> > consistent with how transparent hugepages can be configured.
> >
> > Same results can be achieved with the existing
> > 'transparent_hugepage_shmem' and 'transparent_hugepage_tmpfs' settings
> > in the kernel command line, but it is more convenient to define basic
> > settings at config time instead of changing kernel command line later.
>
> Why do you need these options instead of using CONFIG_CMDLINE?
> They should pull off exactly what you want, but without changing the kernel?
Thanks for the suggestion, Pedro. I think CONFIG_CMDLINE could work, but
for this purpose it doesn't seem ideal. Relying on CONFIG_CMDLINE isn't
a very scalable solution, since over time it tends to accumulate into a
long, unstructured string that isn't validated at build time. It also
mixes configuration layers: build-time policy and boot-time setup, which
makes the resulting behavior a bit harder to maintain in the long run.
So this approach is mainly about improving long-term maintainability and
operational clarity. I hope that makes sense.
>
> --
> Pedro