Re: [PATCH v4] mm: Override mTHP "enabled" defaults at kernel cmdline

From: Barry Song
Date: Wed Aug 14 2024 - 18:47:12 EST


On Wed, Aug 14, 2024 at 2:03 PM Barry Song <21cnbao@xxxxxxxxx> wrote:
>
> From: Ryan Roberts <ryan.roberts@xxxxxxx>
>
> Add thp_anon= cmdline parameter to allow specifying the default
> enablement of each supported anon THP size. The parameter accepts the
> following format and can be provided multiple times to configure each
> size:
>
> thp_anon=<size>,<size>[KMG]:<value>;<size>-<size>[KMG]:<value>
>
> An example:
>
> thp_anon=16K-64K:always;128K,512K:inherit;256K:madvise;1M-2M:never
>
> See Documentation/admin-guide/mm/transhuge.rst for more details.
>
> Configuring the defaults at boot time is useful to allow early user
> space to take advantage of mTHP before its been configured through
> sysfs.
>
> Signed-off-by: Ryan Roberts <ryan.roberts@xxxxxxx>
> Co-developed-by: Barry Song <v-songbaohua@xxxxxxxx>
> Signed-off-by: Barry Song <v-songbaohua@xxxxxxxx>
> ---

Hi Andrew,

I saw you have pulled v4. Thanks!

Can you please squash the below changes suggested by Baolin and David?