From: Dan Magenheimer Subject: RE: More on 2.6.28 and balloon driver Date: Wed, 7 Jan 2009 19:45:00 +0000 (GMT) Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="__12313575204904280acsmt703.oracle.com" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org --__12313575204904280acsmt703.oracle.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > 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.) Limited testing, but it appears that adding it back in with this simple patch to linux-2.6.28 makes ballooning work properly. As the code is lifted from the original Xen balloon driver, I'm not sure I need this, but: Signed-off-by: Dan Magenheimer Dan P.S. Attachement is same, provided in case my mailer messes up this >80-char-width patch. --- linux-2.6.28/drivers/xen/balloon.c.orig=092009-01-07 12:35:48.000000000= -0700 +++ linux-2.6.28/drivers/xen/balloon.c=092009-01-07 12:36:06.000000000 -070= 0 @@ -296,6 +296,11 @@ =09=09frame_list[i] =3D pfn_to_mfn(pfn); =20 =09=09scrub_page(page); + +=09=09ret =3D HYPERVISOR_update_va_mapping( +=09=09=09(unsigned long)__va(pfn << PAGE_SHIFT), +=09=09=09__pte_ma(0), 0); +=09=09BUG_ON(ret); =09} =20 =09/* Ensure that ballooned highmem pages don't have kmaps. */ --__12313575204904280acsmt703.oracle.com Content-Type: application/octet-stream; name="balloon.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="balloon.patch" LS0tIGxpbnV4LTIuNi4yOC9kcml2ZXJzL3hlbi9iYWxsb29uLmMub3JpZwkyMDA5LTAxLTA3IDEy OjM1OjQ4LjAwMDAwMDAwMCAtMDcwMAorKysgbGludXgtMi42LjI4L2RyaXZlcnMveGVuL2JhbGxv b24uYwkyMDA5LTAxLTA3IDEyOjM2OjA2LjAwMDAwMDAwMCAtMDcwMApAQCAtMjk2LDYgKzI5Niwx MSBAQAogCQlmcmFtZV9saXN0W2ldID0gcGZuX3RvX21mbihwZm4pOwogCiAJCXNjcnViX3BhZ2Uo cGFnZSk7CisKKwkJcmV0ID0gSFlQRVJWSVNPUl91cGRhdGVfdmFfbWFwcGluZygKKwkJCSh1bnNp Z25lZCBsb25nKV9fdmEocGZuIDw8IFBBR0VfU0hJRlQpLAorCQkJX19wdGVfbWEoMCksIDApOwor CQlCVUdfT04ocmV0KTsKIAl9CiAKIAkvKiBFbnN1cmUgdGhhdCBiYWxsb29uZWQgaGlnaG1lbSBw YWdlcyBkb24ndCBoYXZlIGttYXBzLiAqLwo= --__12313575204904280acsmt703.oracle.com Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --__12313575204904280acsmt703.oracle.com--