Skip to content

Commit 2b1a20c

Browse files
liulangrenaaatorvalds
authored andcommitted
mm/compaction: move compaction_suitable's comment to right place
Since commit 837d026 ("mm/compaction: more trace to understand when/why compaction start/finish"), the comment place is not suitable. So move compaction_suitable's comment to right place. Link: https://lkml.kernel.org/r/20201116144121.GA385717@rlk Signed-off-by: Hui Su <sh_def@163.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 19d3cf9 commit 2b1a20c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

mm/compaction.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,13 +2070,6 @@ static enum compact_result compact_finished(struct compact_control *cc)
20702070
return ret;
20712071
}
20722072

2073-
/*
2074-
* compaction_suitable: Is this suitable to run compaction on this zone now?
2075-
* Returns
2076-
* COMPACT_SKIPPED - If there are too few free pages for compaction
2077-
* COMPACT_SUCCESS - If the allocation would succeed without compaction
2078-
* COMPACT_CONTINUE - If compaction should run now
2079-
*/
20802073
static enum compact_result __compaction_suitable(struct zone *zone, int order,
20812074
unsigned int alloc_flags,
20822075
int highest_zoneidx,
@@ -2120,6 +2113,13 @@ static enum compact_result __compaction_suitable(struct zone *zone, int order,
21202113
return COMPACT_CONTINUE;
21212114
}
21222115

2116+
/*
2117+
* compaction_suitable: Is this suitable to run compaction on this zone now?
2118+
* Returns
2119+
* COMPACT_SKIPPED - If there are too few free pages for compaction
2120+
* COMPACT_SUCCESS - If the allocation would succeed without compaction
2121+
* COMPACT_CONTINUE - If compaction should run now
2122+
*/
21232123
enum compact_result compaction_suitable(struct zone *zone, int order,
21242124
unsigned int alloc_flags,
21252125
int highest_zoneidx)

0 commit comments

Comments
 (0)