linux/drivers/virtio
Amit Shah 4eb05d562e virtio: balloon: leak / fill balloon across S4
commit e562966dba added support for S4 to
the balloon driver.  The freeze function did nothing to free the pages,
since reclaiming the pages from the host to immediately give them back
(if S4 was successful) seemed wasteful.  Also, if S4 wasn't successful,
the guest would have to re-fill the balloon.  On restore, the pages were
supposed to be marked freed and the free page counters were incremented
to reflect the balloon was totally deflated.

However, this wasn't done right.  The pages that were earlier taken away
from the guest during a balloon inflation operation were just shown as
used pages after a successful restore from S4.  Just a fancy way of
leaking lots of memory.

Instead of trying that, just leak the balloon on freeze and fill it on
restore/thaw paths.  This works properly now.  The optimisation to not
leak can be added later on after a bit of refactoring of the code.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-01 09:28:41 +10:30
..
config.c
Kconfig virtio: add HAS_IOMEM dependency to MMIO platform bus driver 2011-11-24 13:04:47 +10:30
Makefile virtio: Add platform bus driver for memory mapped virtio device 2011-11-02 11:41:01 +10:30
virtio_balloon.c virtio: balloon: leak / fill balloon across S4 2012-03-01 09:28:41 +10:30
virtio_mmio.c virtio: harsher barriers for rpmsg. 2012-01-12 15:44:42 +10:30
virtio_pci.c virtio: pci: add PM notification handlers for restore, freeze, thaw, poweroff 2012-01-12 15:44:44 +10:30
virtio_ring.c virtio: correct the memory barrier in virtqueue_kick_prepare() 2012-01-28 08:10:23 +10:30
virtio.c virtio: Add module.h to drivers/virtio users. 2011-10-31 19:32:14 -04:00