Skip to content

Commit e9f58af

Browse files
committed
mm, compaction: check if a page has been captured before draining PCP pages
jira LE-4623 Rebuild_History Non-Buildable kernel-4.18.0-553.81.1.el8_10 commit-author Mel Gorman <mgorman@techsingularity.net> commit 16b3be4 If a page has been captured then draining is unnecssary so check first for a captured page. Link: https://lkml.kernel.org/r/20230125134434.18017-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Cc: Chuyi Zhou <zhouchuyi@bytedance.com> Cc: Jiri Slaby <jirislaby@kernel.org> Cc: Maxim Levitsky <mlevitsk@redhat.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Pedro Falcato <pedro.falcato@gmail.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> (cherry picked from commit 16b3be4) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 7daac83 commit e9f58af

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mm/compaction.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,6 +2388,12 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
23882388
}
23892389
}
23902390

2391+
/* Stop if a page has been captured */
2392+
if (capc && capc->page) {
2393+
ret = COMPACT_SUCCESS;
2394+
break;
2395+
}
2396+
23912397
check_drain:
23922398
/*
23932399
* Has the migration scanner moved away from the previous
@@ -2406,12 +2412,6 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
24062412
last_migrated_pfn = 0;
24072413
}
24082414
}
2409-
2410-
/* Stop if a page has been captured */
2411-
if (capc && capc->page) {
2412-
ret = COMPACT_SUCCESS;
2413-
break;
2414-
}
24152415
}
24162416

24172417
out:

0 commit comments

Comments
 (0)