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] fix logic of ballooning out to handle the dom0_min_mem p

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] fix logic of ballooning out to handle the dom0_min_mem parameter correctly
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 21 Aug 2005 17:06:28 +0000
Delivery-date: Sun, 21 Aug 2005 17:22:19 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 vh249@xxxxxxxxxxxxxxxxxxxxxx
# Node ID eb2c985e88be573f10f5ef48ff93fa1b2c1f0927
# Parent  342ccfca85d75872ff32074e6d9f697464a5e784
fix logic of ballooning out to handle the dom0_min_mem parameter correctly
add an error message when having not enough memory

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 342ccfca85d7 -r eb2c985e88be tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Sun Aug 21 16:24:23 2005
+++ b/tools/python/xen/xm/create.py     Sun Aug 21 16:49:54 2005
@@ -688,7 +688,9 @@
     dom0_cur_alloc = get_dom0_alloc()
     dom0_new_alloc = dom0_cur_alloc - (domU_need_mem - free_mem)
 
-    if free_mem < domU_need_mem and dom0_new_alloc >= dom0_min_mem:
+    if free_mem < domU_need_mem and dom0_new_alloc < dom0_min_mem:
+        ret = 1
+    if free_mem < domU_need_mem and ret == 0:
 
         server.xend_domain_mem_target_set(0, dom0_new_alloc)
 
@@ -734,7 +736,8 @@
         dom0_min_mem = xroot.get_dom0_min_mem()
         if dom0_min_mem != 0:
             if balloon_out(dom0_min_mem, opts):
-                return
+                print >>sys.stderr, "error: cannot allocate enough memory for 
domain"
+                sys.exit(1)
 
         dom = make_domain(opts, config)
         if opts.vals.console_autoconnect:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] fix logic of ballooning out to handle the dom0_min_mem parameter correctly, Xen patchbot -unstable <=