diff options
author | Dan Magenheimer <dan.magenheimer@oracle.com> | 2009-01-22 17:36:08 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-22 17:41:44 -0500 |
commit | 1058a75f07b9bb8323fb5197be5526220f8b75cf (patch) | |
tree | 3dcdc077c2c045043629b1999a40f8e1f13996d5 /drivers/xen/balloon.c | |
parent | 066941bd4eeb159307a5d7d795100d0887c00442 (diff) |
xen: actually release memory when shrinking domain
Fix this:
> It appears that in the upstream balloon driver,
> the call to HYPERVISOR_update_va_mapping is missing
> from decrease_reservation. I think as a result,
> the balloon driver is eating memory but not
> releasing it to Xen, thus rendering the balloon
> driver essentially useless. (Can be observed via xentop.)
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/xen/balloon.c')
-rw-r--r-- | drivers/xen/balloon.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 8dc7109d61b7..8069d520c460 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -298,6 +298,11 @@ static int decrease_reservation(unsigned long nr_pages) | |||
298 | frame_list[i] = pfn_to_mfn(pfn); | 298 | frame_list[i] = pfn_to_mfn(pfn); |
299 | 299 | ||
300 | scrub_page(page); | 300 | scrub_page(page); |
301 | |||
302 | ret = HYPERVISOR_update_va_mapping( | ||
303 | (unsigned long)__va(pfn << PAGE_SHIFT), | ||
304 | __pte_ma(0), 0); | ||
305 | BUG_ON(ret); | ||
301 | } | 306 | } |
302 | 307 | ||
303 | /* Ensure that ballooned highmem pages don't have kmaps. */ | 308 | /* Ensure that ballooned highmem pages don't have kmaps. */ |