WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xend: fix ballooning bug

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: fix ballooning bug
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jan 2009 02:50:51 -0800
Delivery-date: Fri, 16 Jan 2009 02:53:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1231860546 0
# Node ID d8267d3d26657ce5f84ffd4fcb60742791abef04
# Parent  73770182aee48e79a2caa441ad1013982deefddb
xend: fix ballooning bug

c/s 18960 introduced a bug when xend balloons memory. The function
balloon.free requires a reference to a XendDomainInfo object, which is
missing in one call of this function. Attached patch fixes this. Also
replaced the variable name "self" in the (classless) function with
something more descriptive.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
Reported-by: Maik Hentsche <maik.hentsche@xxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    2 +-
 tools/python/xen/xend/balloon.py        |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -r 73770182aee4 -r d8267d3d2665 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Jan 13 15:16:46 2009 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Jan 13 15:29:06 2009 +0000
@@ -1199,7 +1199,7 @@ class XendDomainInfo:
 
         if self.domid >= 0:
             if target > memory_cur:
-                balloon.free( (target-memory_cur)*1024 )
+                balloon.free((target - memory_cur) * 1024, self)
             self.storeVm("memory", target)
             self.storeDom("memory/target", target << 10)
             xc.domain_set_target_mem(self.domid,
diff -r 73770182aee4 -r d8267d3d2665 tools/python/xen/xend/balloon.py
--- a/tools/python/xen/xend/balloon.py  Tue Jan 13 15:16:46 2009 +0000
+++ b/tools/python/xen/xend/balloon.py  Tue Jan 13 15:29:06 2009 +0000
@@ -67,7 +67,7 @@ def get_dom0_target_alloc():
         raise VmError('Failed to query target memory allocation of dom0.')
     return kb
 
-def free(need_mem ,self):
+def free(need_mem, dominfo):
     """Balloon out memory from the privileged domain so that there is the
     specified required amount (in KiB) free.
     """
@@ -130,7 +130,7 @@ def free(need_mem ,self):
         if physinfo['nr_nodes'] > 1 and retries == 0:
             oldnode = -1
             waitscrub = 1
-            vcpus = self.info['cpus'][0]
+            vcpus = dominfo.info['cpus'][0]
             for vcpu in vcpus:
                 nodenum = 0
                 for node in physinfo['node_to_cpu']:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: fix ballooning bug, Xen patchbot-unstable <=