• Philip P. Moltmann's avatar
    VMware balloon: Do not limit the amount of frees and allocations in non-sleep mode. · 33d268ed
    Philip P. Moltmann authored
    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: default avatarXavier Deguillard <xdeguillard@vmware.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    33d268ed
vmw_balloon.c 27.9 KB