* + mm-hugetlb_cma-optimize-hugetlb_cma_alloc_frozen_folio.patch added to mm-new branch
@ 2026-01-12 17:21 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-01-12 17:21 UTC (permalink / raw)
To: mm-commits, ziy, willy, vbabka, sidhartha.kumar, osalvador,
muchun.song, jane.chu, jackmanb, hannes, david, wangkefeng.wang,
akpm
The patch titled
Subject: mm: hugetlb_cma: optimize hugetlb_cma_alloc_frozen_folio()
has been added to the -mm mm-new branch. Its filename is
mm-hugetlb_cma-optimize-hugetlb_cma_alloc_frozen_folio.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-hugetlb_cma-optimize-hugetlb_cma_alloc_frozen_folio.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
The mm-new branch of mm.git is not included in linux-next
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: mm: hugetlb_cma: optimize hugetlb_cma_alloc_frozen_folio()
Date: Mon, 12 Jan 2026 23:09:53 +0800
Check hugetlb_cma_size which helps to avoid unnecessary gfp check or
nodemask traversal.
Link: https://lkml.kernel.org/r/20260112150954.1802953-5-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Jane Chu <jane.chu@oracle.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/hugetlb_cma.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/mm/hugetlb_cma.c~mm-hugetlb_cma-optimize-hugetlb_cma_alloc_frozen_folio
+++ a/mm/hugetlb_cma.c
@@ -16,7 +16,7 @@
static struct cma *hugetlb_cma[MAX_NUMNODES];
static unsigned long hugetlb_cma_size_in_node[MAX_NUMNODES] __initdata;
static bool hugetlb_cma_only;
-static unsigned long hugetlb_cma_size __initdata;
+static unsigned long hugetlb_cma_size __ro_after_init;
void hugetlb_cma_free_frozen_folio(struct folio *folio)
{
@@ -31,6 +31,9 @@ struct folio *hugetlb_cma_alloc_frozen_f
struct folio *folio;
struct page *page = NULL;
+ if (!hugetlb_cma_size)
+ return NULL;
+
if (hugetlb_cma[nid])
page = cma_alloc_frozen_compound(hugetlb_cma[nid], order);
_
Patches currently in -mm which might be from wangkefeng.wang@huawei.com are
mm-debug_vm_pgtable-add-debug_vm_pgtable_free_huge_page.patch
mm-page_alloc-add-__split_page.patch
mm-cma-kill-cma_pages_valid.patch
mm-page_alloc-add-alloc_contig_frozen_rangepages.patch
mm-cma-add-cma_alloc_frozen_compound.patch
mm-hugetlb-allocate-frozen-pages-for-gigantic-allocation.patch
mm-page_isolation-introduce-page_is_unmovable.patch
mm-page_alloc-optimize-pfn_range_valid_contig.patch
mm-hugetlb-optimize-replace_free_hugepage_folios.patch
mm-hugetlb_cma-optimize-hugetlb_cma_alloc_frozen_folio.patch
mm-hugetlb_cma-mark-hugetlb_cma_only-as-__ro_after_init.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-01-12 17:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-12 17:21 + mm-hugetlb_cma-optimize-hugetlb_cma_alloc_frozen_folio.patch added to mm-new branch Andrew Morton
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.