[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: minor ballooning cleanup



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1213105981 -3600
# Node ID 4c1e740e392c92842cb8a384e892add4b380ac23
# Parent  c7d361cf579372b7b5e9168892beadc6304bb4c9
xend: minor ballooning cleanup

In xend/balloon.py, there's only one place where dom0_start_alloc_mb
is used. Move its initialization to right before its usage.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 tools/python/xen/xend/balloon.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r c7d361cf5793 -r 4c1e740e392c tools/python/xen/xend/balloon.py
--- a/tools/python/xen/xend/balloon.py  Tue Jun 10 14:51:00 2008 +0100
+++ b/tools/python/xen/xend/balloon.py  Tue Jun 10 14:53:01 2008 +0100
@@ -96,7 +96,6 @@ def free(need_mem):
     xoptions = XendOptions.instance()
     dom0 = XendDomain.instance().privilegedDomain()
     xc = xen.lowlevel.xc.xc()
-    dom0_start_alloc_mb = get_dom0_current_alloc() / 1024
 
     try:
         dom0_min_mem = xoptions.get_dom0_min_mem() * 1024
@@ -176,6 +175,7 @@ def free(need_mem):
                 (need_mem, dom0_min_mem, dom0_min_mem,
                  free_mem + scrub_mem + dom0_alloc - dom0_min_mem))
         else:
+            dom0_start_alloc_mb = get_dom0_current_alloc() / 1024
             dom0.setMemoryTarget(dom0_start_alloc_mb)
             raise VmError(
                 ('Not enough memory is available, and dom0 cannot'

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.