mm/balloon_compaction: add vmstat counters and kpageflags bit
authorKonstantin Khlebnikov <k.khlebnikov@samsung.com>
Thu, 9 Oct 2014 22:29:32 +0000 (15:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 10 Oct 2014 02:26:01 +0000 (22:26 -0400)
commit09316c09dde33aae14f34489d9e3d243ec0d5938
tree3238cf34be33d587a93db64a9f934f8b1c69cfb8
parent9d1ba8056474a208ed9efb7e58cd014795d9f818
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>
drivers/virtio/Kconfig
drivers/virtio/virtio_balloon.c
fs/proc/page.c
include/linux/balloon_compaction.h
include/linux/vm_event_item.h
include/uapi/linux/kernel-page-flags.h
mm/Kconfig
mm/Makefile
mm/balloon_compaction.c
mm/vmstat.c
tools/vm/page-types.c