[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPTztWYC_-tdFv5bwTrhtRL61SQSmGfsNQ-r1dy9fy_oCWVnsQ@mail.gmail.com>
Date: Tue, 30 Apr 2024 09:20:21 -0700
From: Frank van der Linden <fvdl@...gle.com>
To: linux-mm@...ck.org, muchun.song@...ux.dev, akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, Roman Gushchin <roman.gushchin@...ux.dev>
Subject: Re: [PATCH] mm/hugetlb: align cma on allocation order, not demotion order
Note that this applies on top of:
https://lore.kernel.org/lkml/20240404162515.527802-2-fvdl@google.com/
.which is in mm-stable right now. It's not a fixup of that patch,
though, it's a separate issue. Although they could be combined in to a
"fix arguments to cma_declare_contiguous_nid" commit.
On Tue, Apr 30, 2024 at 9:14 AM Frank van der Linden <fvdl@...gle.com> wrote:
>
> Align the CMA area for hugetlb gigantic pages to their size, not the
> size that they can be demoted to. Otherwise there might be misaligned
> sections at the start and end of the CMA area that will never be used
> for hugetlb page allocations.
>
> Signed-off-by: Frank van der Linden <fvdl@...gle.com>
> Cc: Roman Gushchin <roman.gushchin@...ux.dev>
> Fixes: a01f43901cfb ("hugetlb: be sure to free demoted CMA pages to CMA")
> ---
> mm/hugetlb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 5dc3f5ea3a2e..cfe7b025c576 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -7794,7 +7794,7 @@ void __init hugetlb_cma_reserve(int order)
> * huge page demotion.
> */
> res = cma_declare_contiguous_nid(0, size, 0,
> - PAGE_SIZE << HUGETLB_PAGE_ORDER,
> + PAGE_SIZE << order,
> HUGETLB_PAGE_ORDER, false, name,
> &hugetlb_cma[nid], nid);
> if (res) {
> --
> 2.45.0.rc0.197.gbae5840b3b-goog
>
Powered by blists - more mailing lists