summaryrefslogtreecommitdiff
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorKemeng Shi <shikemeng@huaweicloud.com>2023-08-04 14:04:54 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-08-21 23:37:43 +0300
commit18c59d58baa60a8bfaec58d29b6b94877664eed8 (patch)
tree74848e9ea10a18389e387be516964d1fd66c8a70 /mm/compaction.c
parentf82024cbfa3a410d947b588658949a8a391da8a7 (diff)
downloadlinux-18c59d58baa60a8bfaec58d29b6b94877664eed8.tar.xz
mm/compaction: only set skip flag if cc->no_set_skip_hint is false
Keep the same logic as update_pageblock_skip, only set skip if no_set_skip_hint is false which is more reasonable. Link: https://lkml.kernel.org/r/20230804110454.2935878-9-shikemeng@huaweicloud.com Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Reviewed-by: David Hildenbrand <david@redhat.com> Cc: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index 91a9dfa41ef4..fe7b4e7c5d24 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1442,7 +1442,7 @@ fast_isolate_around(struct compact_control *cc, unsigned long pfn)
isolate_freepages_block(cc, &start_pfn, end_pfn, &cc->freepages, 1, false);
/* Skip this pageblock in the future as it's full or nearly full */
- if (start_pfn == end_pfn)
+ if (start_pfn == end_pfn && !cc->no_set_skip_hint)
set_pageblock_skip(page);
}