]> Git Repo - qemu.git/commit - hw/virtio/virtio-balloon.c
virtio-balloon: Restore MADV_WILLNEED hint on balloon deflate
authorDavid Gibson <[email protected]>
Wed, 6 Mar 2019 03:06:01 +0000 (14:06 +1100)
committerMichael S. Tsirkin <[email protected]>
Wed, 13 Mar 2019 01:22:31 +0000 (21:22 -0400)
commit596546fe9e4d1d1fa6423c300e2a73b6f90baeb0
tree484590a6662b5953f3367171d8fe1a55bff38162
parentb27b3239140470b7d593e3b0b09687bcc6fbf274
virtio-balloon: Restore MADV_WILLNEED hint on balloon deflate

Prior to f6deb6d9 "virtio-balloon: Remove unnecessary MADV_WILLNEED on
deflate", the balloon device issued an madvise() MADV_WILLNEED on
pages removed from the balloon.  That would hint to the host kernel
that the pages were likely to be needed by the guest in the near
future.

It's unclear if this is actually valuable or not, and so f6deb6d9
removed this, essentially ignoring balloon deflate requests.  However,
concerns have been raised that this might cause a performance
regression by causing extra latency for the guest in certain
configurations.

So, until we can get actual benchmark data to see if that's the case,
this restores the old behaviour, issuing a MADV_WILLNEED when a page is
removed from the balloon.

Signed-off-by: David Gibson <[email protected]>
Message-Id: <20190306030601[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/virtio/virtio-balloon.c
This page took 0.035321 seconds and 4 git commands to generate.