virtio_balloon: export 'available' memory to balloon statistics
authorIgor Redko <redkoi@virtuozzo.com>
Thu, 17 Mar 2016 21:19:08 +0000 (14:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Mar 2016 22:09:34 +0000 (15:09 -0700)
commit5057dcd0f1aaad57e07e728ba20a99e205c6b9de
tree2c8a3d6fc364777226e03a664e2b824ad8f5dfe1
parentd02bd27bd33dd7e8d22594cd568b81be0cb584cd
virtio_balloon: export 'available' memory to balloon statistics

Add a new field, VIRTIO_BALLOON_S_AVAIL, to virtio_balloon memory
statistics protocol, corresponding to 'Available' in /proc/meminfo.

It indicates to the hypervisor how big the balloon can be inflated
without pushing the guest system to swap.

Signed-off-by: Igor Redko <redkoi@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/virtio/virtio_balloon.c
include/uapi/linux/virtio_balloon.h