summaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorIgor Redko <redkoi@virtuozzo.com>2016-03-17 22:19:05 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-17 23:09:34 +0100
commitd02bd27bd33dd7e8d22594cd568b81be0cb584cd (patch)
treee8bbd51013b90f2b9cf6ea239128f9da1f714e55 /virt/kvm
parentmm/Kconfig: remove redundant arch depend for memory hotplug (diff)
downloadlinux-d02bd27bd33dd7e8d22594cd568b81be0cb584cd.tar.xz
linux-d02bd27bd33dd7e8d22594cd568b81be0cb584cd.zip
mm/page_alloc.c: calculate 'available' memory in a separate function
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. This metric would be very useful in VM orchestration software to improve memory management of different VMs under overcommit. This patch (of 2): Factor out calculation of the available memory counter into a separate exportable function, in order to be able to use it in other parts of the kernel. In particular, it appears a relevant metric to report to the hypervisor via virtio-balloon statistics interface (in a followup patch). 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>
Diffstat (limited to 'virt/kvm')
0 files changed, 0 insertions, 0 deletions