From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>,
David Hildenbrand <david@kernel.org>,
Oscar Salvador <osalvador@suse.de>,
Muchun Song <muchun.song@linux.dev>, <linux-mm@kvack.org>
Cc: <sidhartha.kumar@oracle.com>, <jane.chu@oracle.com>,
Zi Yan <ziy@nvidia.com>, Vlastimil Babka <vbabka@suse.cz>,
Brendan Jackman <jackmanb@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Matthew Wilcox <willy@infradead.org>,
Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: [PATCH mm-new resend 0/5] mm: accelerate gigantic folio allocation
Date: Mon, 12 Jan 2026 23:09:49 +0800 [thread overview]
Message-ID: <20260112150954.1802953-1-wangkefeng.wang@huawei.com> (raw)
Optimize pfn_range_valid_contig() and replace_free_hugepage_folios() in
alloc_contig_frozen_pages() to speed up gigantic folio allocation. The
allocation time for 120*1G folios drops from 3.605s to 0.431s.
resend:
- no function changes,
- split out the page_is_unmovable() into a separate patch, per Andrew
- mark two global values with __ro_after_init in patch5
---
This is part of [patch v2 0/8] mm: hugetlb: allocate frozen gigantic folio[1],
and as suggested by David[2], reuses some logic from the has_unmovable_pages().
[1] https://lore.kernel.org/linux-mm/20250918132000.1951232-1-wangkefeng.wang@huawei.com/
[2] https://lore.kernel.org/linux-mm/17bd2977-6a04-402f-ae84-306167cd16d6@redhat.com/
Kefeng Wang (5):
mm: page_isolation: introduce page_is_unmovable()
mm: page_alloc: optimize pfn_range_valid_contig()
mm: hugetlb: optimize replace_free_hugepage_folios()
mm: hugetlb_cma: optimize hugetlb_cma_alloc_frozen_folio()
mm: hugetlb_cma: mark hugetlb_cma{_only} as __ro_after_init
include/linux/page-isolation.h | 2 +
mm/hugetlb.c | 54 +++++++---
mm/hugetlb_cma.c | 9 +-
mm/page_alloc.c | 25 ++---
mm/page_isolation.c | 187 +++++++++++++++++----------------
5 files changed, 157 insertions(+), 120 deletions(-)
--
2.27.0
next reply other threads:[~2026-01-12 15:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 15:09 Kefeng Wang [this message]
2026-01-12 15:09 ` [PATCH 1/5] mm: page_isolation: introduce page_is_unmovable() Kefeng Wang
2026-01-12 16:36 ` Zi Yan
2026-01-12 15:09 ` [PATCH 2/5] mm: page_alloc: optimize pfn_range_valid_contig() Kefeng Wang
2026-01-12 17:02 ` Zi Yan
2026-01-12 15:09 ` [PATCH 3/5] mm: hugetlb: optimize replace_free_hugepage_folios() Kefeng Wang
2026-01-12 15:09 ` [PATCH 4/5] mm: hugetlb_cma: optimize hugetlb_cma_alloc_frozen_folio() Kefeng Wang
2026-01-12 15:09 ` [PATCH 5/5] mm: hugetlb_cma: mark hugetlb_cma{_only} as __ro_after_init 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=20260112150954.1802953-1-wangkefeng.wang@huawei.com \
--to=wangkefeng.wang@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox