Skip to contentSkip to conversation

mm-compaction-ensure-rescanning-only-happens-on-partially-scanned-pageblocks.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jun 9, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: compaction: ensure rescanning only happens on partially scanned pageblocks
has been removed from the -mm tree. Its filename was
mm-compaction-ensure-rescanning-only-happens-on-partially-scanned-pageblocks.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: Mel Gorman <[email protected]>
Subject: mm: compaction: ensure rescanning only happens on partially scanned pageblocks
Date: Mon, 15 May 2023 12:33:41 +0100

Patch series "Follow-up "Fix excessive CPU usage during compaction"".

The series "Fix excessive CPU usage during compaction" [1] attempted to fix a bug [2] but Vlastimil noted that the fix was incomplete [3]. While the series was merged, fast_find_migrateblock was still disabled. This series should fix the corner cases and allow 95e7a450b819 ("Revert "mm/compaction: fix set skip in fast_find_migrateblock"") to be safely reverted. Details on how many pageblocks are rescanned are in the changelog of the last patch.

"Raghavendra K T" tested this and reported "decent improvement from perf perspective as well as compaction related data [4]

[1] https://lore.kernel.org/r/[email protected]
[2] https://bugzilla.suse.com/show_bug.cgi?id=1206848
[3] https://lore.kernel.org/r/[email protected]
[4] https://lkml.kernel.org/r/[email protected]

This patch (of 4):
compact_zone() intends to rescan pageblocks if there is a failure to migrate "within the current order-aligned block". However, the pageblock scan may already be complete and moved to the next block causing the next pageblock to be "rescanned". Ensure only the most recent pageblock is rescanned.

---

 mm/compaction.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
mm/compaction.c renamed from mm/compaction.c~mm-compaction-ensure-rescanning-only-happens-on-partially-scanned-pageblocks +3 -2
@@ -2465,8 +2465,9 @@ rescan:
 			 * fast_find_migrateblock revisiting blocks that were
 			 * recently partially scanned.
 			 */
-			if (cc->direct_compaction && !cc->finish_pageblock &&
-						(cc->mode < MIGRATE_SYNC)) {
+			if (!pageblock_aligned(cc->migrate_pfn) &&
+			    cc->direct_compaction && !cc->finish_pageblock &&
+			    (cc->mode < MIGRATE_SYNC)) {
 				cc->finish_pageblock = true;
 
 				/*

_

Patches currently in -mm which might be from [email protected] are