|
|
Log in / Subscribe / Register

mm: hugetlb: allocate frozen gigantic folio

From:  Kefeng Wang <wangkefeng.wang-AT-huawei.com>
To:  Andrew Morton <akpm-AT-linux-foundation.org>, David Hildenbrand <david-AT-redhat.com>, Oscar Salvador <osalvador-AT-suse.de>, Muchun Song <muchun.song-AT-linux.dev>, Zi Yan <ziy-AT-nvidia.com>, Matthew Wilcox <willy-AT-infradead.org>
Subject:  [PATCH 0/4] mm: hugetlb: allocate frozen gigantic folio
Date:  Thu, 11 Sep 2025 14:56:55 +0800
Message-ID:  <20250911065659.617954-1-wangkefeng.wang@huawei.com>
Cc:  <sidhartha.kumar-AT-oracle.com>, <jane.chu-AT-oracle.com>, Vlastimil Babka <vbabka-AT-suse.cz>, Brendan Jackman <jackmanb-AT-google.com>, Johannes Weiner <hannes-AT-cmpxchg.org>, <linux-mm-AT-kvack.org>, Kefeng Wang <wangkefeng.wang-AT-huawei.com>
Archive-link:  Article

Convert to allocate frozen gigantic folio in hugetlb, similar to
alloc_buddy_hugetlb_folio(), which avoid atomic operation about
folio refcount.

---
This is the second part for hugetlb allocation changes, the mainly
different from previous version[1] is that we introduce 
alloc_contig_{range_frozen,frozen_pages}()  which don't calls
set_page_refcounted() for both compound or non-compound pages,
also and don't need ACR_FLAGS_FROZEN anymore, suggested by
Matthew and Zi.

Based on mm-unstable 20250910

[1] https://lore.kernel.org/linux-mm/20250902124820.3081488-1...

Kefeng Wang (4):
  mm: debug_vm_pgtable: add debug_vm_pgtable_free_huge_page()
  mm: page_alloc: add alloc_contig_{range_frozen,frozen_pages}()
  mm: cma: add __cma_release()
  mm: hugetlb: allocate frozen pages in alloc_gigantic_folio()

 include/linux/cma.h   |   9 +-
 include/linux/gfp.h   |  46 +++++----
 mm/cma.c              |  83 +++++++---------
 mm/debug_vm_pgtable.c |  35 ++++---
 mm/hugetlb.c          |  50 ++--------
 mm/hugetlb_cma.c      |  13 ++-
 mm/hugetlb_cma.h      |  10 +-
 mm/page_alloc.c       | 213 ++++++++++++++++++++++++++++--------------
 8 files changed, 245 insertions(+), 214 deletions(-)

-- 
2.43.0




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds