[Devel] [PATCH RHEL7 COMMIT] ms/mm/compaction: clean-up code on success of ballon isolation
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Jan 31 18:21:56 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-693.11.6.vz7.42.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.11.6.vz7.42.4
------>
commit 9a81258bb25ce6c9e026dbe6123fa5052ba69388
Author: Joonsoo Kim <iamjoonsoo.kim at lge.com>
Date: Wed Jan 31 18:21:56 2018 +0300
ms/mm/compaction: clean-up code on success of ballon isolation
It is just for clean-up to reduce code size and improve readability.
There is no functional change.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim at lge.com>
Acked-by: Vlastimil Babka <vbabka at suse.cz>
Cc: Mel Gorman <mgorman at suse.de>
Cc: Rik van Riel <riel at redhat.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
(cherry picked from commit b6c750163c0d138f5041d95fcdbd1094b6928057)
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
mm/compaction.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index ba9fa713038d..d833777ddaee 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -566,11 +566,7 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
if (unlikely(balloon_page_movable(page))) {
if (balloon_page_isolate(page)) {
/* Successfully isolated */
- cc->finished_update_migrate = true;
- list_add(&page->lru, migratelist);
- cc->nr_migratepages++;
- nr_isolated++;
- goto check_compact_cluster;
+ goto isolate_success;
}
}
continue;
@@ -631,13 +627,14 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
VM_BUG_ON_PAGE(PageTransCompound(page), page);
/* Successfully isolated */
- cc->finished_update_migrate = true;
del_page_from_lru_list(page, lruvec, page_lru(page));
+
+isolate_success:
+ cc->finished_update_migrate = true;
list_add(&page->lru, migratelist);
cc->nr_migratepages++;
nr_isolated++;
-check_compact_cluster:
/* Avoid isolating too much */
if (cc->nr_migratepages == COMPACT_CLUSTER_MAX) {
++low_pfn;
More information about the Devel
mailing list