public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: actually release memory when shrinking domain
@ 2009-01-22 22:36 Jeremy Fitzhardinge
  2009-01-22 22:42 ` Ingo Molnar
  2009-01-23 14:09 ` [Xen-devel] " Ian Campbell
  0 siblings, 2 replies; 4+ messages in thread
From: Jeremy Fitzhardinge @ 2009-01-22 22:36 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: dan.magenheimer@oracle.com, Linux Kernel Mailing List, Xen-devel,
	Stable Kernel

From: Dan Magenheimer <dan.magenheimer@oracle.com>

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>
---
 drivers/xen/balloon.c |    5 +++++
 1 file changed, 5 insertions(+)

===================================================================
--- linux-2.6.28/drivers/xen/balloon.c.orig
+++ linux-2.6.28/drivers/xen/balloon.c
@@ -296,6 +296,11 @@
 		frame_list[i] = pfn_to_mfn(pfn);
 
 		scrub_page(page);
+
+		ret = HYPERVISOR_update_va_mapping(
+			(unsigned long)__va(pfn << PAGE_SHIFT),
+			__pte_ma(0), 0);
+		BUG_ON(ret);
 	}
 
 	/* Ensure that ballooned highmem pages don't have kmaps. */



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-23 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 22:36 [PATCH] xen: actually release memory when shrinking domain Jeremy Fitzhardinge
2009-01-22 22:42 ` Ingo Molnar
2009-01-23 14:09 ` [Xen-devel] " Ian Campbell
2009-01-23 16:16   ` Jeremy Fitzhardinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox