diff options
author | Konstantin Khlebnikov <k.khlebnikov@samsung.com> | 2014-10-09 18:29:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 22:26:01 -0400 |
commit | 09316c09dde33aae14f34489d9e3d243ec0d5938 (patch) | |
tree | 3238cf34be33d587a93db64a9f934f8b1c69cfb8 /mm/vmstat.c | |
parent | 9d1ba8056474a208ed9efb7e58cd014795d9f818 (diff) |
mm/balloon_compaction: add vmstat counters and kpageflags bit
Always mark pages with PageBalloon even if balloon compaction is disabled
and expose this mark in /proc/kpageflags as KPF_BALLOON.
Also this patch adds three counters into /proc/vmstat: "balloon_inflate",
"balloon_deflate" and "balloon_migrate". They accumulate balloon
activity. Current size of balloon is (balloon_inflate - balloon_deflate)
pages.
All generic balloon code now gathered under option CONFIG_MEMORY_BALLOON.
It should be selected by ballooning driver which wants use this feature.
Currently virtio-balloon is the only user.
Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Cc: Rafael Aquini <aquini@redhat.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r-- | mm/vmstat.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index e9ab104b956f..cce7c766da7a 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -735,7 +735,7 @@ static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat, | |||
735 | TEXT_FOR_HIGHMEM(xx) xx "_movable", | 735 | TEXT_FOR_HIGHMEM(xx) xx "_movable", |
736 | 736 | ||
737 | const char * const vmstat_text[] = { | 737 | const char * const vmstat_text[] = { |
738 | /* Zoned VM counters */ | 738 | /* enum zone_stat_item countes */ |
739 | "nr_free_pages", | 739 | "nr_free_pages", |
740 | "nr_alloc_batch", | 740 | "nr_alloc_batch", |
741 | "nr_inactive_anon", | 741 | "nr_inactive_anon", |
@@ -778,10 +778,13 @@ const char * const vmstat_text[] = { | |||
778 | "workingset_nodereclaim", | 778 | "workingset_nodereclaim", |
779 | "nr_anon_transparent_hugepages", | 779 | "nr_anon_transparent_hugepages", |
780 | "nr_free_cma", | 780 | "nr_free_cma", |
781 | |||
782 | /* enum writeback_stat_item counters */ | ||
781 | "nr_dirty_threshold", | 783 | "nr_dirty_threshold", |
782 | "nr_dirty_background_threshold", | 784 | "nr_dirty_background_threshold", |
783 | 785 | ||
784 | #ifdef CONFIG_VM_EVENT_COUNTERS | 786 | #ifdef CONFIG_VM_EVENT_COUNTERS |
787 | /* enum vm_event_item counters */ | ||
785 | "pgpgin", | 788 | "pgpgin", |
786 | "pgpgout", | 789 | "pgpgout", |
787 | "pswpin", | 790 | "pswpin", |
@@ -860,6 +863,13 @@ const char * const vmstat_text[] = { | |||
860 | "thp_zero_page_alloc", | 863 | "thp_zero_page_alloc", |
861 | "thp_zero_page_alloc_failed", | 864 | "thp_zero_page_alloc_failed", |
862 | #endif | 865 | #endif |
866 | #ifdef CONFIG_MEMORY_BALLOON | ||
867 | "balloon_inflate", | ||
868 | "balloon_deflate", | ||
869 | #ifdef CONFIG_BALLOON_COMPACTION | ||
870 | "balloon_migrate", | ||
871 | #endif | ||
872 | #endif /* CONFIG_MEMORY_BALLOON */ | ||
863 | #ifdef CONFIG_DEBUG_TLBFLUSH | 873 | #ifdef CONFIG_DEBUG_TLBFLUSH |
864 | #ifdef CONFIG_SMP | 874 | #ifdef CONFIG_SMP |
865 | "nr_tlb_remote_flush", | 875 | "nr_tlb_remote_flush", |