]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/balloon: account for pages released during memory setup
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 28 Sep 2011 16:46:32 +0000 (17:46 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 19 Oct 2011 18:26:41 +0000 (14:26 -0400)
commit00516ef5e1c1348ff6ab47567085eb8cb6e78eef
treea3cda006b095bb7bd2b87e1d53a9417fed863e5d
parent50434682e0b54d02a4ce229aac87ea47c71da38c
xen/balloon: account for pages released during memory setup

In xen_memory_setup() pages that occur in gaps in the memory map are
released back to Xen.  This reduces the domain's current page count in
the hypervisor.  The Xen balloon driver does not correctly decrease
its initial current_pages count to reflect this.  If 'delta' pages are
released and the target is adjusted the resulting reservation is
always 'delta' less than the requested target.

This affects dom0 if the initial allocation of pages overlaps the PCI
memory region but won't affect most domU guests that have been setup
with pseudo-physical memory maps that don't have gaps.

Fix this by accouting for the released pages when starting the balloon
driver.

If the domain's targets are managed by xapi, the domain may eventually
run out of memory and die because xapi currently gets its target
calculations wrong and whenever it is restarted it always reduces the
target by 'delta'.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/setup.c
drivers/xen/balloon.c
include/xen/page.h