diff options
author | Denis V. Lunev | 2015-08-20 00:49:49 +0300 |
---|---|---|
committer | Michael S. Tsirkin | 2015-09-08 13:32:11 +0300 |
commit | 997e120843e82609c8d99a9d5714e6cf91e14cbe (patch) | |
tree | 84e03f6d7ec949567ad18dadfa32d7d949e7761d /kernel | |
parent | b4d34037329f46ed818d3b0a6e1e23b9c8721f79 (diff) |
virtio_balloon: do not change memory amount visible via /proc/meminfo
Balloon device is frequently used as a mean of cooperative memory control
in between guest and host to manage memory overcommitment. This is the
typical case for any hosting workload when KVM guest is provided for
end-user.
Though there is a problem in this setup. The end-user and hosting provider
have signed SLA agreement in which some amount of memory is guaranted for
the guest. The good thing is that this memory will be given to the guest
when the guest will really need it (f.e. with OOM in guest and with
VIRTIO_BALLOON_F_DEFLATE_ON_OOM configuration flag set). The bad thing
is that end-user does not know this.
Balloon by default reduce the amount of memory exposed to the end-user
each time when the page is stolen from guest or returned back by using
adjust_managed_page_count and thus /proc/meminfo shows reduced amount
of memory.
Fortunately the solution is simple, we should just avoid to call
adjust_managed_page_count with VIRTIO_BALLOON_F_DEFLATE_ON_OOM set.
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions