From: Matthew Wilcox <willy@infradead.org>
To: David Hildenbrand <david@redhat.com>
Cc: Oscar Salvador <osalvador@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
Muchun Song <muchun.song@linux.dev>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [PATCH] mm,hugetlb: Allocate frozen pages in alloc_buddy_hugetlb_folio
Date: Fri, 11 Apr 2025 15:21:42 +0100 [thread overview]
Message-ID: <Z_kldseGr033Hqny@casper.infradead.org> (raw)
In-Reply-To: <f0373427-b4e8-4612-b668-980d93febe26@redhat.com>
On Fri, Apr 11, 2025 at 03:44:31PM +0200, David Hildenbrand wrote:
> I assume htlb_alloc_mask() will always include _GFP_COMP.
static inline gfp_t htlb_alloc_mask(struct hstate *h)
{
gfp_t gfp = __GFP_COMP | __GFP_NOWARN;
> But semantically, it might be wrong: __folio_alloc() will in the memdesc
> world also make sure to allocate the memdesc, __alloc_frozen_pages() not.
>
> Maybe one would want a __alloc_frozen_folio() .... @willy?
This is fine. Yes, it'll need to be modified when we get to the
separately allocated memdesc, but there's a number of places that
cast the freshly allocated page to a folio, and I'll have to come up
with a way to catch them all.
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Oscar, if you want to take on the gigantic allocation next ...
- I don't think we need folio_alloc_gigantic() to be wrapped in
alloc_hooks
- folio_alloc_gigantic() should return a frozen folio
- as should hugetlb_cma_alloc_folio()
next prev parent reply other threads:[~2025-04-11 14:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 13:23 [PATCH] mm,hugetlb: Allocate frozen pages in alloc_buddy_hugetlb_folio Oscar Salvador
2025-04-11 13:32 ` Vlastimil Babka
2025-04-11 13:44 ` David Hildenbrand
2025-04-11 14:21 ` Matthew Wilcox [this message]
2025-04-11 17:13 ` David Hildenbrand
2025-04-13 18:50 ` Oscar Salvador
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=Z_kldseGr033Hqny@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=vbabka@suse.cz \
/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