summaryrefslogtreecommitdiff
path: root/mm/compaction.c
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linux.alibaba.com>2023-01-10 16:36:20 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-02-03 09:32:53 +0300
commit1bfb7684db1233d9e3f3f26fbbc0c58d40ff65e7 (patch)
tree4825caa8297996f1895f0d956a8ef42217c7897d /mm/compaction.c
parent753ec50d976c28b08266dec3110905b377464eb1 (diff)
downloadlinux-1bfb7684db1233d9e3f3f26fbbc0c58d40ff65e7.tar.xz
mm: compaction: count the migration scanned pages events for proactive compaction
The proactive compaction will reuse per-node kcompactd threads, so we should also count the KCOMPACTD_MIGRATE_SCANNED and KCOMPACTD_FREE_SCANNED events for proactive compaction. Link: https://lkml.kernel.org/r/b7f1ece1adc17defa47e3667b5f9fd61f496517a.1673342761.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com> Cc: Matthew Wilcox <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/compaction.c')
-rw-r--r--mm/compaction.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/compaction.c b/mm/compaction.c
index f8e8addc8664..62f6bb68c9cb 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2659,6 +2659,11 @@ static void proactive_compact_node(pg_data_t *pgdat)
cc.zone = zone;
compact_zone(&cc, NULL);
+
+ count_compact_events(KCOMPACTD_MIGRATE_SCANNED,
+ cc.total_migrate_scanned);
+ count_compact_events(KCOMPACTD_FREE_SCANNED,
+ cc.total_free_scanned);
}
}