Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Subject: mm/hugetlb: fix CMA handling and surplus allocation accounting
@ 2026-10-28 11:33 Kaitao Cheng
  2026-10-28 11:33 ` [PATCH 1/3] mm/hugetlb_cma: fix incorrect hugetlb_cma_size assignment on malformed input Kaitao Cheng
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Kaitao Cheng @ 2026-10-28 11:33 UTC (permalink / raw)
  To: Muchun Song, Oscar Salvador, David Hildenbrand, Andrew Morton
  Cc: Baolin Wang, Mike Kravetz, Frank van der Linden, Michal Hocko,
	Joshua Hahn, Chris Down, Roman Gushchin, linux-mm, linux-kernel,
	Kaitao Cheng

From: Kaitao Cheng <chengkaitao@kylinos.cn>

This series fixes three independent HugeTLB issues reported by Sashiko,
covering CMA parameter parsing, CMA allocation state preservation, and
NR_HUGETLB accounting on allocation rollback.

Patch 1 rejects a global hugetlb_cma size following node-specific entries.
This prevents malformed input from overwriting valid per-node reservations
with an incorrectly parsed global size.

Patch 2 preserves the CMA flag when a folio is returned to the HugeTLB
pool after vmemmap restoration fails. This ensures that a subsequent free
releases the CMA allocation correctly instead of leaving its bitmap set.

Patch 3 fixes NR_HUGETLB accounting when unused surplus folios are freed
during allocation or reservation cleanup.

Kaitao Cheng (3):
  mm/hugetlb_cma: fix incorrect hugetlb_cma_size assignment on malformed
    input
  mm/hugetlb: preserve CMA flag when returning folios to the pool
  mm/hugetlb: fix NR_HUGETLB accounting for unused surplus folios

 mm/hugetlb.c     | 13 +++++++++++--
 mm/hugetlb_cma.c |  3 +++
 2 files changed, 14 insertions(+), 2 deletions(-)

-- 
2.53.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-10-29  3:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28 11:33 [PATCH 0/3] Subject: mm/hugetlb: fix CMA handling and surplus allocation accounting Kaitao Cheng
2026-10-28 11:33 ` [PATCH 1/3] mm/hugetlb_cma: fix incorrect hugetlb_cma_size assignment on malformed input Kaitao Cheng
2026-10-28 13:47   ` Muchun Song
2026-10-28 14:46   ` Oscar Salvador (SUSE)
2026-10-28 11:33 ` [PATCH 2/3] mm/hugetlb: preserve CMA flag when returning folios to the pool Kaitao Cheng
2026-10-28 13:56   ` Muchun Song
2026-10-28 14:00     ` Zi Yan
2026-10-28 11:33 ` [PATCH 3/3] mm/hugetlb: fix NR_HUGETLB accounting for unused surplus folios Kaitao Cheng
2026-10-28 15:01   ` Oscar Salvador (SUSE)
2026-10-29  3:21     ` Muchun Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox