From: David Hildenbrand <david@redhat.com>
To: 20250910133958.301467-1-wangkefeng.wang@huawei.com,
Andrew Morton <akpm@linux-foundation.org>,
Oscar Salvador <osalvador@suse.de>,
Muchun Song <muchun.song@linux.dev>, Zi Yan <ziy@nvidia.com>,
Matthew Wilcox <willy@infradead.org>
Cc: sidhartha.kumar@oracle.com, jane.chu@oracle.com,
Vlastimil Babka <vbabka@suse.cz>,
Brendan Jackman <jackmanb@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-mm@kvack.org, Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: Re: [PATCH 4/4] mm: hugetlb: allocate frozen pages in alloc_gigantic_folio()
Date: Thu, 11 Sep 2025 10:25:59 +0200 [thread overview]
Message-ID: <90e926c9-40cb-4791-8360-e3d145fe3503@redhat.com> (raw)
In-Reply-To: <20250911065659.617954-5-wangkefeng.wang@huawei.com>
On 11.09.25 08:56, Kefeng Wang wrote:
> The alloc_gigantic_folio() allocates a folio by alloc_contig_range()
> with refcount increated and then freeze it, convert to allocate a frozen
> folio directly to remove the atomic operation about folio refcount, also
> saving atomic operation during __update_and_free_hugetlb_folio too.
>
> Rename some functions to make them more self-explanatory,
>
> folio_alloc_gigantic -> folio_alloc_frozen_gigantic
> cma_{alloc,free}_folio -> cma_{alloc,free}_frozen_folio
> hugetlb_cma_{alloc,free}_folio -> hugetlb_cma_{alloc,free}_frozen_folio
Can we just get rid of folio_alloc_frozen_gigantic?
Further, can we just get rid of cma_{alloc,free}_frozen_folio() as well
and just let hugetlb use alloc_contig_range_frozen() etc?
Long term alloc_contig_range() should just return frozen pages.
--
Cheers
David / dhildenb
next prev parent reply other threads:[~2025-09-11 8:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 6:56 [PATCH 0/4] mm: hugetlb: allocate frozen gigantic folio Kefeng Wang
2025-09-11 6:56 ` [PATCH 1/4] mm: debug_vm_pgtable: add debug_vm_pgtable_free_huge_page() Kefeng Wang
2025-09-12 6:58 ` Kefeng Wang
2025-09-11 6:56 ` [PATCH 2/4] mm: page_alloc: add alloc_contig_{range_frozen,frozen_pages}() Kefeng Wang
2025-09-11 6:56 ` [PATCH 3/4] mm: cma: add __cma_release() Kefeng Wang
2025-09-11 6:56 ` [PATCH 4/4] mm: hugetlb: allocate frozen pages in alloc_gigantic_folio() Kefeng Wang
2025-09-11 8:25 ` David Hildenbrand [this message]
2025-09-11 9:11 ` Kefeng Wang
2025-09-11 18:56 ` David Hildenbrand
2025-09-12 6:57 ` Kefeng Wang
2025-09-12 7:18 ` David Hildenbrand
2025-09-12 7:23 ` David Hildenbrand
2025-09-12 9:12 ` Kefeng Wang
2025-09-12 18:07 ` David Hildenbrand
2025-09-13 4:13 ` Kefeng Wang
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=90e926c9-40cb-4791-8360-e3d145fe3503@redhat.com \
--to=david@redhat.com \
--cc=20250910133958.301467-1-wangkefeng.wang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=jane.chu@oracle.com \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=sidhartha.kumar@oracle.com \
--cc=vbabka@suse.cz \
--cc=wangkefeng.wang@huawei.com \
--cc=willy@infradead.org \
--cc=ziy@nvidia.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.