Commit 8b71b499 authored by Baolin Wang's avatar Baolin Wang Committed by Andrew Morton

mm: compaction: only set skip flag if cc->no_set_skip_hint is false

To keep the same logic as test_and_set_skip(), only set the skip flag if
cc->no_set_skip_hint is false, which makes code more reasonable.

Link: https://lkml.kernel.org/r/0eb2cd2407ffb259ae6e3071e10f70f2d41d0f3e.1685018752.git.baolin.wang@linux.alibaba.comSigned-off-by: default avatarBaolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent cf650342
...@@ -1201,7 +1201,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, ...@@ -1201,7 +1201,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
* rescanned twice in a row. * rescanned twice in a row.
*/ */
if (low_pfn == end_pfn && (!nr_isolated || cc->finish_pageblock)) { if (low_pfn == end_pfn && (!nr_isolated || cc->finish_pageblock)) {
if (valid_page && !skip_updated) if (!cc->no_set_skip_hint && valid_page && !skip_updated)
set_pageblock_skip(valid_page); set_pageblock_skip(valid_page);
update_cached_migrate(cc, low_pfn); update_cached_migrate(cc, low_pfn);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment