* [merged mm-stable] mm-huge_memory-fix-outdated-comment-about-freeing-subpages-in-__folio_split.patch removed from -mm tree
@ 2026-05-29 4:06 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-05-29 4:06 UTC (permalink / raw)
To: mm-commits, ziy, youngjun.park, shikemeng, ryan.roberts, nphamcs,
npache, ljs, liam, lance.yang, kasong, dev.jain, david, chrisl,
bhe, baolin.wang, baohua, akpm
The quilt patch titled
Subject: mm/huge_memory: fix outdated comment about freeing subpages in __folio_split
has been removed from the -mm tree. Its filename was
mm-huge_memory-fix-outdated-comment-about-freeing-subpages-in-__folio_split.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Barry Song (Xiaomi)" <baohua@kernel.org>
Subject: mm/huge_memory: fix outdated comment about freeing subpages in __folio_split
Date: Thu, 23 Apr 2026 11:49:17 +0800
The comment appears to be outdated. add_to_swap() no longer exists,
and the explanation of why we need to call put_page() after splitting
could be made more general.
Link: https://lore.kernel.org/20260423034917.8234-1-baohua@kernel.org
Signed-off-by: Barry Song (Xiaomi) <baohua@kernel.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: Zi Yan <ziy@nvidia.com>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Nico Pache <npache@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Lance Yang <lance.yang@linux.dev>
Cc: Chris Li <chrisl@kernel.org>
Cc: Kairui Song <kasong@tencent.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Youngjun Park <youngjun.park@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/huge_memory.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/mm/huge_memory.c~mm-huge_memory-fix-outdated-comment-about-freeing-subpages-in-__folio_split
+++ a/mm/huge_memory.c
@@ -4190,11 +4190,10 @@ fail:
folio_unlock(new_folio);
/*
- * Subpages may be freed if there wasn't any mapping
- * like if add_to_swap() is running on a lru page that
- * had its mapping zapped. And freeing these pages
- * requires taking the lru_lock so we do the put_page
- * of the tail pages after the split is complete.
+ * Subpages whose mapping has been zapped may be freed
+ * earlier, but freeing them requires taking the
+ * lru_lock, so we defer put_page() on tail pages until
+ * after the split completes.
*/
free_folio_and_swap_cache(new_folio);
}
_
Patches currently in -mm which might be from baohua@kernel.org are
mm-mglru-use-folio_mark_accessed-to-replace-folio_set_active.patch
mm-mglru-avoid-reclaim-type-fall-back-when-isolation-makes-no-progress.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-29 4:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-29 4:06 [merged mm-stable] mm-huge_memory-fix-outdated-comment-about-freeing-subpages-in-__folio_split.patch removed from -mm tree 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.