From: Oscar Salvador <osalvador@suse.de>
To: Frank van der Linden <fvdl@google.com>
Cc: akpm@linux-foundation.org, muchun.song@linux.dev, linux-mm@kvack.org
Subject: Re: [PATCH] mm/hugetlb: copy the CMA flag when demoting
Date: Fri, 2 May 2025 09:17:44 +0200 [thread overview]
Message-ID: <aBRxmN1HiM0t_wXV@localhost.localdomain> (raw)
In-Reply-To: <20250501044325.20365-1-fvdl@google.com>
On Thu, May 01, 2025 at 04:43:24AM +0000, Frank van der Linden wrote:
> Since commit d2d786714080 ("mm/hugetlb: enable bootmem allocation
> from CMA areas"), a flag is used to mark hugetlb folios as allocated
> from CMA. This flag is also used to decide if it should be freed
> to CMA.
>
> However, the flag isn't copied to the smaller folios when a hugetlb
> folio is broken up for demotion, which would cause it to be freed
> incorrectly.
>
> Fix this by copying the flag to the smaller order hugetlb pages
> created from the original one.
>
> Fixes: d2d786714080 ("mm/hugetlb: enable bootmem allocation from CMA areas")
> Signed-off-by: Frank van der Linden <fvdl@google.com>
Hi Frank,
Reviewed-by: Oscar Salvador <osalvador@suse.de>
By the way, AFAICS we are missing some docs for HPG_cma flag in include/linux/hugetlb.h.
Could you please add it :-P?
Thanks!
--
Oscar Salvador
SUSE Labs
next prev parent reply other threads:[~2025-05-02 7:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 4:43 Frank van der Linden
2025-05-02 7:17 ` Oscar Salvador [this message]
2025-05-02 8:27 ` Anshuman Khandual
2025-05-02 16:23 ` Frank van der Linden
2025-05-05 17:02 ` jane.chu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aBRxmN1HiM0t_wXV@localhost.localdomain \
--to=osalvador@suse.de \
--cc=akpm@linux-foundation.org \
--cc=fvdl@google.com \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox