aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shi <[email protected]>2020-08-11 18:31:10 -0700
committerLinus Torvalds <[email protected]>2020-08-12 10:57:56 -0700
commit860b32729a21e0565585a9e2ecea2e5244d65acd (patch)
treef22be7fd44311b251db328bb682d7733f7c3dcbf
parentd34c0a7599ea8c301bc471dfa1eb2bf2db6752d1 (diff)
mm/compaction: correct the comments of compact_defer_shift
There is no compact_defer_limit. It should be compact_defer_shift in use. and add compact_order_failed explanation. Signed-off-by: Alex Shi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Alexander Duyck <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--include/linux/mmzone.h1
-rw-r--r--mm/compaction.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index efbd95dd3bbf..8379432f4f2f 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -536,6 +536,7 @@ struct zone {
* On compaction failure, 1<<compact_defer_shift compactions
* are skipped before trying again. The number attempted since
* last failure is tracked with compact_considered.
+ * compact_order_failed is the minimum compaction failed order.
*/
unsigned int compact_considered;
unsigned int compact_defer_shift;
diff --git a/mm/compaction.c b/mm/compaction.c
index b7d433f1706a..5e8f2e22b73e 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -154,7 +154,7 @@ EXPORT_SYMBOL(__ClearPageMovable);
/*
* Compaction is deferred when compaction fails to result in a page
- * allocation success. 1 << compact_defer_limit compactions are skipped up
+ * allocation success. 1 << compact_defer_shift, compactions are skipped up
* to a limit of 1 << COMPACT_MAX_DEFER_SHIFT
*/
void defer_compaction(struct zone *zone, int order)