Your patch doesn't handle my previous some comment so I coded up some patches based on your patch. I don't care Andrew merge my patch because your patch doesn't have a problem in point of working but at least I want to tell some minor problems. If you agree this series, I hope you merge this series into your patch and resend Andrew to not bother him. >From dbe8fe04ef383cece9805663d4540989f54f435b Mon Sep 17 00:00:00 2001 From: Minchan Kim <minchan@xxxxxxxxxx> Date: Sat, 5 May 2012 08:14:55 +0900 Subject: [PATCH 1/3] compaction: remove nr_pageblocks_scanned Now it doesn't have any role so let's remove that variable. If we need that, we can add it later easily. Adding unnecessary variable makes readbility worse and error-prone. Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx> --- mm/compaction.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/mm/compaction.c b/mm/compaction.c index 407010c..2f6ba0f 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -405,9 +405,6 @@ static bool suitable_migration_target(struct page *page, int migratetype = get_pageblock_migratetype(page); - if (count_pageblocks && cc->mode == COMPACT_ASYNC_MOVABLE) - cc->nr_pageblocks_scanned++; - /* Don't interfere with memory hot-remove or the min_free_kbytes blocks */ if (migratetype == MIGRATE_ISOLATE || migratetype == MIGRATE_RESERVE) return false; @@ -464,7 +461,6 @@ static void isolate_freepages(struct zone *zone, zone_end_pfn = zone->zone_start_pfn + zone->spanned_pages; - cc->nr_pageblocks_scanned = 0; cc->nr_pageblocks_skipped = 0; /* @@ -771,7 +767,6 @@ out: static unsigned long compact_zone_order(struct zone *zone, int order, gfp_t gfp_mask, enum compact_mode mode, - unsigned long *nr_pageblocks_scanned, unsigned long *nr_pageblocks_skipped) { struct compact_control cc = { @@ -788,7 +783,6 @@ static unsigned long compact_zone_order(struct zone *zone, INIT_LIST_HEAD(&cc.migratepages); rc = compact_zone(zone, &cc); - *nr_pageblocks_scanned = cc.nr_pageblocks_scanned; *nr_pageblocks_skipped = cc.nr_pageblocks_skipped; return rc; @@ -816,7 +810,7 @@ unsigned long try_to_compact_pages(struct zonelist *zonelist, struct zoneref *z; struct zone *zone; int rc = COMPACT_SKIPPED; - unsigned long nr_pageblocks_scanned = 0, nr_pageblocks_skipped = 0; + unsigned long nr_pageblocks_skipped = 0; enum compact_mode mode = sync ? COMPACT_SYNC : COMPACT_ASYNC_MOVABLE; /* @@ -835,7 +829,7 @@ unsigned long try_to_compact_pages(struct zonelist *zonelist, int status; retry: status = compact_zone_order(zone, order, gfp_mask, mode, - &nr_pageblocks_scanned, &nr_pageblocks_skipped); + &nr_pageblocks_skipped); rc = max(status, rc); /* If a normal allocation would succeed, stop compacting */ @@ -843,7 +837,7 @@ retry: break; if (rc == COMPACT_COMPLETE && mode == COMPACT_ASYNC_MOVABLE) { - if (nr_pageblocks_scanned && nr_pageblocks_skipped) { + if (nr_pageblocks_skipped) { mode = COMPACT_ASYNC_UNMOVABLE; goto retry; } -- 1.7.9.5 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>