linux-stable/drivers/xen
Ian Campbell bc2c030322 xen: try harder to balloon up under memory pressure.
Currently if the balloon driver is unable to increase the guest's
reservation it assumes the failure was due to reaching its full
allocation, gives up on the ballooning operation and records the limit
it reached as the "hard limit". The driver will not try again until
the target is set again (even to the same value).

However it is possible that ballooning has in fact failed due to
memory pressure in the host and therefore it is desirable to keep
attempting to reach the target in case memory becomes available. The
most likely scenario is that some guests are ballooning down while
others are ballooning up and therefore there is temporary memory
pressure while things stabilise. You would not expect a well behaved
toolstack to ask a domain to balloon to more than its allocation nor
would you expect it to deliberately over-commit memory by setting
balloon targets which exceed the total host memory.

This patch drops the concept of a hard limit and causes the balloon
driver to retry increasing the reservation on a timer in the same
manner as when decreasing the reservation.

Also if we partially succeed in increasing the reservation
(i.e. receive less pages than we asked for) then we may as well keep
those pages rather than returning them to Xen.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stable Kernel <stable@kernel.org>
2009-12-04 08:15:19 -08:00
..
xenbus xen: wait up to 5 minutes for device connetion 2009-12-03 11:14:49 -08:00
xenfs headers: remove sched.h from poll.h 2009-10-04 15:05:10 -07:00
balloon.c xen: try harder to balloon up under memory pressure. 2009-12-04 08:15:19 -08:00
cpu_hotplug.c xen: honour VCPU availability on boot 2009-04-08 14:25:51 -07:00
events.c xen: don't leak IRQs over suspend/resume. 2009-12-03 11:14:55 -08:00
evtchn.c includecheck fix: drivers/xen, evtchn.c 2009-09-20 16:02:20 +05:30
features.c xen: clean up asm/xen/hypervisor.h 2008-12-16 21:50:31 +01:00
grant-table.c xen: clean up asm/xen/hypervisor.h 2008-12-16 21:50:31 +01:00
Kconfig Merge commit 'origin/master' into for-linus/xen/master 2009-04-07 13:34:16 -07:00
Makefile xen: make -fstack-protector work under Xen 2009-09-09 16:37:39 -07:00
manage.c xen: explicitly create/destroy stop_machine workqueues outside suspend/resume region. 2009-12-03 11:14:56 -08:00
sys-hypervisor.c xen: drop kexec bits from /sys/hypervisor since kexec isn't implemented yet 2009-03-30 09:27:07 -07:00
xencomm.c xen: portability clean up and some minor clean up for xencomm.c 2008-10-23 21:54:36 +02:00