[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4978F4D8.6090706@goop.org>
Date: Thu, 22 Jan 2009 14:36:08 -0800
From: Jeremy Fitzhardinge <jeremy@...p.org>
To: Ingo Molnar <mingo@...e.hu>
CC: "dan.magenheimer@...cle.com" <dan.magenheimer@...cle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Xen-devel <xen-devel@...ts.xensource.com>,
Stable Kernel <stable@...nel.org>
Subject: [PATCH] xen: actually release memory when shrinking domain
From: Dan Magenheimer <dan.magenheimer@...cle.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@...cle.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.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. */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists