[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGsJ_4y9rRC54E4sma8fhZSd3aWDY2ubR+o5Et=cAeK9+gmOgA@mail.gmail.com>
Date: Tue, 22 Jul 2025 16:19:15 +0800
From: Barry Song <21cnbao@...il.com>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, David Hildenbrand <david@...hat.com>, Zi Yan <ziy@...dia.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
"Liam R . Howlett" <Liam.Howlett@...cle.com>, Nico Pache <npache@...hat.com>,
Ryan Roberts <ryan.roberts@....com>, Dev Jain <dev.jain@....com>,
Jonathan Corbet <corbet@....net>, linux-mm@...ck.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] docs: update THP documentation to clarify sysfs "never" setting
On Tue, Jul 22, 2025 at 1:34 PM Lorenzo Stoakes
<lorenzo.stoakes@...cle.com> wrote:
>
> Hi Andrew,
>
> Could you apply this fix-patch? It adds the caveat regarding MADV_COLLAPSE in a
> couple other places whwere the sysfs 'never' mode is mentioned.
>
> Thanks, Lorenzo
>
> ----8<----
> From 7c0bdda6a633bc38e7d5a3b0acf2cef7bdc961af Mon Sep 17 00:00:00 2001
> From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> Date: Tue, 22 Jul 2025 06:32:18 +0100
> Subject: [PATCH] docs: update admin guide transhuge page to mention
> MADV_COLLAPSE everywhere
>
> We previously missed a couple places where the 'never' mode was described,
> put the caveat regarding MADV_COLLAPSE in these locations also.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
LGTM, thanks!
Reviewed-by: Barry Song <baohua@...nel.org>
> ---
> Documentation/admin-guide/mm/transhuge.rst | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst
> index 182519197ef7..370fba113460 100644
> --- a/Documentation/admin-guide/mm/transhuge.rst
> +++ b/Documentation/admin-guide/mm/transhuge.rst
> @@ -385,7 +385,9 @@ always
> Attempt to allocate huge pages every time we need a new page;
>
> never
> - Do not allocate huge pages;
> + Do not allocate huge pages. Note that ``madvise(..., MADV_COLLAPSE)``
> + can still cause transparent huge pages to be obtained even if this mode
> + is specified everywhere;
>
> within_size
> Only allocate huge page if it will be fully within i_size.
> @@ -441,7 +443,9 @@ inherit
> have enabled="inherit" and all other hugepage sizes have enabled="never";
>
> never
> - Do not allocate <size> huge pages;
> + Do not allocate <size> huge pages. Note that ``madvise(...,
> + MADV_COLLAPSE)`` can still cause transparent huge pages to be obtained
> + even if this mode is specified everywhere;
>
> within_size
> Only allocate <size> huge page if it will be fully within i_size.
> --
> 2.50.1
Powered by blists - more mailing lists