diff options
-rw-r--r-- | include/linux/vm_event_item.h | 2 | ||||
-rw-r--r-- | mm/compaction.c | 8 | ||||
-rw-r--r-- | mm/vmstat.c | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h index 8aa7cb94b5fb..a1f750b8e72a 100644 --- a/include/linux/vm_event_item.h +++ b/include/linux/vm_event_item.h | |||
@@ -42,6 +42,8 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
42 | PGMIGRATE_SUCCESS, PGMIGRATE_FAIL, | 42 | PGMIGRATE_SUCCESS, PGMIGRATE_FAIL, |
43 | #endif | 43 | #endif |
44 | #ifdef CONFIG_COMPACTION | 44 | #ifdef CONFIG_COMPACTION |
45 | COMPACTMIGRATE_SCANNED, COMPACTFREE_SCANNED, | ||
46 | COMPACTISOLATED, | ||
45 | COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS, | 47 | COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS, |
46 | #endif | 48 | #endif |
47 | #ifdef CONFIG_HUGETLB_PAGE | 49 | #ifdef CONFIG_HUGETLB_PAGE |
diff --git a/mm/compaction.c b/mm/compaction.c index 2c077a78487c..aee7443a4d5a 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -356,6 +356,10 @@ static unsigned long isolate_freepages_block(struct compact_control *cc, | |||
356 | if (blockpfn == end_pfn) | 356 | if (blockpfn == end_pfn) |
357 | update_pageblock_skip(cc, valid_page, total_isolated, false); | 357 | update_pageblock_skip(cc, valid_page, total_isolated, false); |
358 | 358 | ||
359 | count_vm_events(COMPACTFREE_SCANNED, nr_scanned); | ||
360 | if (total_isolated) | ||
361 | count_vm_events(COMPACTISOLATED, total_isolated); | ||
362 | |||
359 | return total_isolated; | 363 | return total_isolated; |
360 | } | 364 | } |
361 | 365 | ||
@@ -646,6 +650,10 @@ next_pageblock: | |||
646 | 650 | ||
647 | trace_mm_compaction_isolate_migratepages(nr_scanned, nr_isolated); | 651 | trace_mm_compaction_isolate_migratepages(nr_scanned, nr_isolated); |
648 | 652 | ||
653 | count_vm_events(COMPACTMIGRATE_SCANNED, nr_scanned); | ||
654 | if (nr_isolated) | ||
655 | count_vm_events(COMPACTISOLATED, nr_isolated); | ||
656 | |||
649 | return low_pfn; | 657 | return low_pfn; |
650 | } | 658 | } |
651 | 659 | ||
diff --git a/mm/vmstat.c b/mm/vmstat.c index 89a7fd665b32..3a067fabe190 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -779,6 +779,9 @@ const char * const vmstat_text[] = { | |||
779 | "pgmigrate_fail", | 779 | "pgmigrate_fail", |
780 | #endif | 780 | #endif |
781 | #ifdef CONFIG_COMPACTION | 781 | #ifdef CONFIG_COMPACTION |
782 | "compact_migrate_scanned", | ||
783 | "compact_free_scanned", | ||
784 | "compact_isolated", | ||
782 | "compact_stall", | 785 | "compact_stall", |
783 | "compact_fail", | 786 | "compact_fail", |
784 | "compact_success", | 787 | "compact_success", |