]> git.karo-electronics.de Git - karo-tx-linux.git/commit
VMware balloon: Do not limit the amount of frees and allocations in non-sleep mode.
authorPhilip P. Moltmann <moltmann@vmware.com>
Thu, 6 Aug 2015 22:18:01 +0000 (15:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Oct 2015 11:59:11 +0000 (12:59 +0100)
commit33d268ed00190e8bc642508f9eb2f3f9ac0a1569
tree4e98e3c5755937b333bae4fad4f1619f9cd0a973
parentb36e89da86022c04fa5e7c32f0d55c1ba23c1ab8
VMware balloon: Do not limit the amount of frees and allocations in non-sleep mode.

When VMware's hypervisor requests a VM to reclaim memory this is preferrably done
via ballooning. If the balloon driver does not return memory fast enough, more
drastic methods, such as hypervisor-level swapping are needed. These other methods
cause performance issues, e.g. hypervisor-level swapping requires the hypervisor to
swap in a page syncronously while the virtual CPU is blocked.

Hence it is in the interest of the VM to balloon memory as fast as possible. The
problem with doing this is that the VM might end up doing nothing else than
ballooning and the user might notice that the VM is stalled, esp. when the VM has
only a single virtual CPU.

This is less of a problem if the VM and the hypervisor perform balloon operations
faster. Also the balloon driver yields regularly, hence on a single virtual CPU
the Linux scheduler should be able to properly time-slice between ballooning and
other tasks.

Testing Done: quickly ballooned a lot of pages while wathing if there are any
perceived hickups (periods of non-responsiveness) in the execution of the
linux VM. No such hickups were seen.

Signed-off-by: Xavier Deguillard <xdeguillard@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/vmw_balloon.c