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>
Showing
- drivers/virtio/Kconfig 1 addition, 0 deletionsdrivers/virtio/Kconfig
- drivers/virtio/virtio_balloon.c 1 addition, 0 deletionsdrivers/virtio/virtio_balloon.c
- fs/proc/page.c 3 additions, 0 deletionsfs/proc/page.c
- include/linux/balloon_compaction.h 2 additions, 0 deletionsinclude/linux/balloon_compaction.h
- include/linux/vm_event_item.h 7 additions, 0 deletionsinclude/linux/vm_event_item.h
- include/uapi/linux/kernel-page-flags.h 1 addition, 0 deletionsinclude/uapi/linux/kernel-page-flags.h
- mm/Kconfig 6 additions, 1 deletionmm/Kconfig
- mm/Makefile 2 additions, 1 deletionmm/Makefile
- mm/balloon_compaction.c 2 additions, 0 deletionsmm/balloon_compaction.c
- mm/vmstat.c 11 additions, 1 deletionmm/vmstat.c
- tools/vm/page-types.c 1 addition, 0 deletionstools/vm/page-types.c
Loading
Please register or sign in to comment