вторник

[Bug 1587089] Re: Hide "ballooned" memory from /proc in guest Ubuntu

Ubuntu 15.10 (Wily Werewolf) has reached end of life, so this bug will
not be fixed for that specific release.

** Changed in: linux-lts-utopic (Ubuntu Wily)
Status: New => Won't Fix

** Changed in: linux-lts-utopic (Ubuntu Trusty)
Status: New => Won't Fix

** Changed in: linux-lts-utopic (Ubuntu)
Status: New => Won't Fix

--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/1587089

Title:
Hide "ballooned" memory from /proc in guest Ubuntu

Status in linux package in Ubuntu:
Fix Released
Status in linux-lts-utopic package in Ubuntu:
Won't Fix
Status in linux source package in Trusty:
Fix Released
Status in linux-lts-utopic source package in Trusty:
Won't Fix
Status in linux source package in Wily:
Fix Released
Status in linux-lts-utopic source package in Wily:
Won't Fix

Bug description:
There is QEMU/KVM and a Linux guest running inside the guest. The amount
of memory available for guest could be adjusted by balloon for better
host scalability. The problem that this change is visible for end-user
actually using the guest. This could (potentially) result in lawsuite
from the end-user to hosting provides.

The problem is addressed in mainstream Linux with the following patch
set:

commit 997e120843e82609c8d99a9d5714e6cf91e14cbe
Author: Denis V. Lunev <den@openvz.org>
Date: Thu Aug 20 00:49:49 2015 +0300
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>


commit b4d34037329f46ed818d3b0a6e1e23b9c8721f79
Author: Denis V. Lunev <den@openvz.org>
Date: Thu Aug 20 00:49:48 2015 +0300
virtio_ballon: change stub of release_pages_by_pfn

and rename it to release_pages_balloon. The function originally takes
arrays of pfns and now it takes pointer to struct virtio_ballon.
This change is necessary to conditionally call adjust_managed_page_count
in the next patch.

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>

The issue affects ubuntu_server_14.0, ubuntu_server_15.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1587089/+subscriptions

Комментариев нет:

Отправить комментарий