Commit 1bfb7684 authored by Baolin Wang's avatar Baolin Wang Committed by Andrew Morton
Browse files

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: default avatarBaolin Wang <baolin.wang@linux.alibaba.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 753ec50d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
	}
}