* [PATCH][TOOLS] xend: minor ballooning cleanup
@ 2008-06-10 13:28 Christoph Egger
0 siblings, 0 replies; only message in thread
From: Christoph Egger @ 2008-06-10 13:28 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 645 bytes --]
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.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
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
[-- Attachment #2: tools_xend.diff --]
[-- Type: text/x-diff, Size: 883 bytes --]
diff -r d77214a97e04 tools/python/xen/xend/balloon.py
--- a/tools/python/xen/xend/balloon.py Tue Jun 10 13:50:31 2008 +0100
+++ b/tools/python/xen/xend/balloon.py Tue Jun 10 15:17:52 2008 +0200
@@ -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'
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-10 13:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-10 13:28 [PATCH][TOOLS] xend: minor ballooning cleanup Christoph Egger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.