]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xen/balloon: Subtract from xen_released_pages the count that is populated.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 29 May 2012 16:36:43 +0000 (12:36 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 29 May 2012 18:07:02 +0000 (14:07 -0400)
commite64d88c68a7389dda367cdc09c130be8ec3e24dc
tree0564a6de2c938db557a9a64b2884ec40d4fcac79
parenteff7494e3269611c81689046ba235b3db0a9fdfe
xen/balloon: Subtract from xen_released_pages the count that is populated.

We did not take into account that xen_released_pages would be
used outside the initial E820 parsing code. As such we would
did not subtract from xen_released_pages the count of pages
that we had populated back (instead we just did a simple
extra_pages = released - populated).

The balloon driver uses xen_released_pages to set the initial
current_pages count.  If this is wrong (too low) then when a new
(higher) target is set, the balloon driver will request too many pages
from Xen."

This fixes errors such as:

(XEN) memory.c:133:d0 Could not allocate order=0 extent: id=0 memflags=0 (51 of 512)
during bootup and
free_memory            : 0

where the free_memory should be 128.

Acked-by: David Vrabel <david.vrabel@citrix.com>
[v1: Per David's review made the git commit better]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/xen/setup.c