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-devel

[Xen-devel] [PATCH] xend: Use maxmem value to set domain maxmem

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xend: Use maxmem value to set domain maxmem
From: Ryan Harper <ryanh@xxxxxxxxxx>
Date: Fri, 7 Jul 2006 11:58:26 -0500
Delivery-date: Fri, 07 Jul 2006 09:59:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
When creating a domain and passing a maxmem value > memory, I get the
following output from xen:

(XEN) (file=page_alloc.c, line=603) Over-allocation for domain 1: 32769 > 32768

Xend is using self.info['memory'] to set maxmem rather than the maxmem
value.  The attached patch fixes xend to use self.info['maxmem'] to set
the domain's maxmem value during domain creation.

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@xxxxxxxxxx


diffstat output:
 XendDomainInfo.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>
---
# HG changeset patch
# User Ryan Harper <ryanh@xxxxxxxxxx>
# Node ID ff76cda5649708a4ab755b40cbd628f0401de118
# Parent  8e55c5c1147589b7a6a1875384d4317aec7ccf84
Currently a domain's maxmem value is being set with the memory value even if the
user specifies maxmem in config.  This patch uses maxmem value to set maxmem
instead of memory.

diff -r 8e55c5c11475 -r ff76cda56497 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Jul  5 17:48:41 2006
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Jul  5 14:30:27 2006
@@ -1277,9 +1277,11 @@
                     cpu = [ int( cpus[v % len(cpus)] ) ]
                     xc.vcpu_setaffinity(self.domid, v, cpu)
 
+            # set domain maxmem in KiB
+            xc.domain_setmaxmem(self.domid, self.info['maxmem'] * 1024)
+
             m = self.image.getDomainMemory(self.info['memory'] * 1024)
             balloon.free(m)
-            xc.domain_setmaxmem(self.domid, m)
 
             init_reservation = self.info['memory'] * 1024
             if os.uname()[4] == 'ia64':

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xend: Use maxmem value to set domain maxmem, Ryan Harper <=