Skip to contentSkip to conversation

xend: minor ballooning cleanup

PATCH New Christoph Egger 1 participant 1 message Jun 10, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xend: minor ballooning cleanup

Hi!

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

Signature · 12 lines
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy
tools/python/xen/xend/balloon.py +1 -1
diff -r d77214a97e04 tools/python/xen/xend/balloon.py
@@ -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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel