* [merged mm-stable] mm-skip-mlocked-thps-that-are-underused-early-in-deferred_split_scan.patch removed from -mm tree
@ 2025-09-21 21:26 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-09-21 21:26 UTC (permalink / raw)
To: mm-commits, ziy, usamaarif642, ryan.roberts, npache,
lorenzo.stoakes, liam.howlett, kirill, dev.jain, david,
baolin.wang, baohua, lance.yang, akpm
The quilt patch titled
Subject: mm: skip mlocked THPs that are underused early in deferred_split_scan()
has been removed from the -mm tree. Its filename was
mm-skip-mlocked-thps-that-are-underused-early-in-deferred_split_scan.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: Lance Yang <lance.yang@linux.dev>
Subject: mm: skip mlocked THPs that are underused early in deferred_split_scan()
Date: Mon, 8 Sep 2025 17:07:41 +0800
When we stumble over a fully-mapped mlocked THP in the deferred shrinker,
it does not make sense to try to detect whether it is underused, because
try_to_map_unused_to_zeropage(), called while splitting the folio, will
not actually replace any zeroed pages by the shared zeropage.
Splitting the folio in that case does not make any sense, so let's not
even scan to check if the folio is underused.
Link: https://lkml.kernel.org/r/20250908090741.61519-1-lance.yang@linux.dev
Signed-off-by: Lance Yang <lance.yang@linux.dev>
Suggested-by: David Hildenbrand <david@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Usama Arif <usamaarif642@gmail.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Lance Yang <lance.yang@linux.dev>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Mariano Pache <npache@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Kiryl Shutsemau <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/huge_memory.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/mm/huge_memory.c~mm-skip-mlocked-thps-that-are-underused-early-in-deferred_split_scan
+++ a/mm/huge_memory.c
@@ -4175,6 +4175,13 @@ static unsigned long deferred_split_scan
bool underused = false;
if (!folio_test_partially_mapped(folio)) {
+ /*
+ * See try_to_map_unused_to_zeropage(): we cannot
+ * optimize zero-filled pages after splitting an
+ * mlocked folio.
+ */
+ if (folio_test_mlocked(folio))
+ goto next;
underused = thp_underused(folio);
if (!underused)
goto next;
_
Patches currently in -mm which might be from lance.yang@linux.dev are
hung_task-fix-warnings-caused-by-unaligned-lock-pointers.patch
selftests-mm-skip-soft-dirty-tests-when-config_mem_soft_dirty-is-disabled.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-21 21:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-21 21:26 [merged mm-stable] mm-skip-mlocked-thps-that-are-underused-early-in-deferred_split_scan.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.