From: "Qi Zheng" <zhengqi.arch@bytedance.com>
To: "Jose A. Perez de Azpillaga" <azpijr@gmail.com>,
"Qi Zheng" <qi.zheng@linux.dev>, <muchun.song@linux.dev>,
<osalvador@suse.de>, <david@kernel.org>,
<akpm@linux-foundation.org>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] mm: hugetlb: track CMA reservations by page order
Date: Mon, 19 Oct 2026 15:10:40 +0800 [thread overview]
Message-ID: <61c88ac2-43e9-4e78-98c4-a1879da6f79e@bytedance.com> (raw)
In-Reply-To: <ac34f212-2e51-4298-a281-9380fb0d073c@gmail.com>
Hi Jose,
On 10/18/26 2:41 AM, Jose A. Perez de Azpillaga wrote:
> On 10/16/26 12:07 PM, Qi Zheng wrote:
>> From: Qi Zheng <zhengqi.arch@bytedance.com>
>>
>> Prepare for a separate CMA pool for PMD-sized HugeTLB pages by organizing
>> CMA areas and reservation parameters into pools identified by page order.
>>
>> Select the corresponding pool for allocation, CMA-only checks and
>> boot-time allocation decisions. Release folios through the CMA area that
>> owns their physical memory, including after demotion.
>>
>> Record each pool's successfully reserved capacity. Remove
>> hugetlb_cma_validate_params(), since the per-pool CMA-only check already
>> handles missing or empty pools.
>>
>> Continue accepting only the architecture's existing CMA page size and
>> preserve the default pool's use by all gigantic sizes. PMD-sized pool
>> support will be added in a subsequent patch.
>>
>> Assisted-by: LLM
>> Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
>
> [snip]
>
>> +static struct hugetlb_cma_pool hugetlb_cma[HUGE_MAX_HSTATE] __ro_after_init;
>> +static struct hugetlb_cma_config hugetlb_cma_config[HUGE_MAX_HSTATE] __initdata;
>> +static unsigned int hugetlb_cma_nr __ro_after_init;
>
> the commit message prepares for one more pool, the PMD one, and
> hugetlb_cma_pool() folds every gigantic order into the default pool.
> would a fixed pair work instead of an order-keyed array?
Do you mean keeping two fixed pools, like this:
enum {
HUGETLB_CMA_DEFAULT,
HUGETLB_CMA_PMD,
HUGETLB_CMA_POOLS,
};
If so, I agree. That is sufficient for this series and simpler than an
order-keyed array.
Thanks,
Qi
next prev parent reply other threads:[~2026-10-19 7:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 10:07 [PATCH 0/5] mm: hugetlb: add CMA support for PMD-sized page Qi Zheng
2026-10-16 10:07 ` [PATCH 1/5] mm: hugetlb: add explicit page size to hugetlb_cma Qi Zheng
2026-10-17 17:31 ` Jose A. Perez de Azpillaga
2026-10-16 10:07 ` [PATCH 2/5] mm: hugetlb: group CMA pool and reservation state Qi Zheng
2026-10-17 17:53 ` Jose A. Perez de Azpillaga
2026-10-16 10:07 ` [PATCH 3/5] mm: hugetlb: track CMA reservations by page order Qi Zheng
2026-10-17 18:41 ` Jose A. Perez de Azpillaga
2026-10-19 7:10 ` Qi Zheng [this message]
2026-10-16 10:07 ` [PATCH 4/5] mm: hugetlb: avoid recursive CMA allocation during migration Qi Zheng
2026-10-17 18:54 ` Jose A. Perez de Azpillaga
2026-10-19 7:17 ` Qi Zheng
2026-10-16 10:07 ` [PATCH 5/5] mm: hugetlb: enable CMA allocation for PMD-sized pages Qi Zheng
2026-10-17 19:07 ` Jose A. Perez de Azpillaga
2026-10-19 7:32 ` Qi Zheng
2026-10-20 9:16 ` Lance Yang
2026-10-20 10:23 ` Qi Zheng
2026-10-19 6:50 ` [PATCH 0/5] mm: hugetlb: add CMA support for PMD-sized page Muchun Song
2026-10-19 7:37 ` Qi Zheng
2026-10-19 7:50 ` Muchun Song
2026-10-19 8:20 ` Jose A. Perez de Azpillaga
2026-10-19 8:43 ` Muchun Song
2026-10-19 9:17 ` Jose A. Perez de Azpillaga
2026-10-19 12:18 ` David Hildenbrand (Arm)
2026-10-20 7:46 ` Qi Zheng
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=61c88ac2-43e9-4e78-98c4-a1879da6f79e@bytedance.com \
--to=zhengqi.arch@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=azpijr@gmail.com \
--cc=david@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=osalvador@suse.de \
--cc=qi.zheng@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
all inboxes | Powered by JetHome®