The patch titled Subject: mm: compaction: count the migration scanned pages events for proactive compaction has been added to the -mm mm-unstable branch. Its filename is mm-compaction-count-the-migration-scanned-pages-events-for-proactive-compaction.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-compaction-count-the-migration-scanned-pages-events-for-proactive-compaction.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> Subject: mm: compaction: count the migration scanned pages events for proactive compaction Date: Tue, 10 Jan 2023 21:36:20 +0800 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@xxxxxxxxxxxxxxxxx Signed-off-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/compaction.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/mm/compaction.c~mm-compaction-count-the-migration-scanned-pages-events-for-proactive-compaction +++ a/mm/compaction.c @@ -2659,6 +2659,11 @@ static void proactive_compact_node(pg_da 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); } } _ Patches currently in -mm which might be from baolin.wang@xxxxxxxxxxxxxxxxx are mm-compaction-remove-redundant-vm_bug_on-in-compact_zone.patch mm-compaction-move-list-validation-into-compact_zone.patch mm-compaction-count-the-migration-scanned-pages-events-for-proactive-compaction.patch mm-compaction-add-missing-kcompactd-wakeup-trace-event.patch mm-compaction-avoid-fragmentation-score-calculation-for-empty-zones.patch