Commit 2b1a20c3 authored by Hui Su's avatar Hui Su Committed by Linus Torvalds

mm/compaction: move compaction_suitable's comment to right place

Since commit 837d026d ("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@rlkSigned-off-by: default avatarHui Su <sh_def@163.com>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 19d3cf9d
...@@ -2070,13 +2070,6 @@ static enum compact_result compact_finished(struct compact_control *cc) ...@@ -2070,13 +2070,6 @@ static enum compact_result compact_finished(struct compact_control *cc)
return ret; return ret;
} }
/*
* compaction_suitable: Is this suitable to run compaction on this zone now?
* Returns
* COMPACT_SKIPPED - If there are too few free pages for compaction
* COMPACT_SUCCESS - If the allocation would succeed without compaction
* COMPACT_CONTINUE - If compaction should run now
*/
static enum compact_result __compaction_suitable(struct zone *zone, int order, static enum compact_result __compaction_suitable(struct zone *zone, int order,
unsigned int alloc_flags, unsigned int alloc_flags,
int highest_zoneidx, int highest_zoneidx,
...@@ -2120,6 +2113,13 @@ static enum compact_result __compaction_suitable(struct zone *zone, int order, ...@@ -2120,6 +2113,13 @@ static enum compact_result __compaction_suitable(struct zone *zone, int order,
return COMPACT_CONTINUE; return COMPACT_CONTINUE;
} }
/*
* compaction_suitable: Is this suitable to run compaction on this zone now?
* Returns
* COMPACT_SKIPPED - If there are too few free pages for compaction
* COMPACT_SUCCESS - If the allocation would succeed without compaction
* COMPACT_CONTINUE - If compaction should run now
*/
enum compact_result compaction_suitable(struct zone *zone, int order, enum compact_result compaction_suitable(struct zone *zone, int order,
unsigned int alloc_flags, unsigned int alloc_flags,
int highest_zoneidx) int highest_zoneidx)
......
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