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] [xen-unstable] Fix the xm mem-max command. Closes bug #9

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix the xm mem-max command. Closes bug #933.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 26 Mar 2007 14:20:10 -0700
Delivery-date: Mon, 26 Mar 2007 14:20:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174913433 -3600
# Node ID e5f13664cfee473920cf0ad14584c347540d01b9
# Parent  15c74855ba684a46d90fd67869bb9e9ff9af2c4b
Fix the xm mem-max command.  Closes bug #933.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -r 15c74855ba68 -r e5f13664cfee tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Mar 26 13:46:07 2007 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Mar 26 13:50:33 2007 +0100
@@ -593,13 +593,15 @@ class XendDomainInfo:
         """Set the maximum memory limit of this domain
         @param limit: In MiB.
         """
-        log.debug("Setting memory maximum of domain %s (%d) to %d MiB.",
-                  self.info['name_label'], self.domid, limit)
+        log.debug("Setting memory maximum of domain %s (%s) to %d MiB.",
+                  self.info['name_label'], str(self.domid), limit)
 
         if limit <= 0:
             raise XendError('Invalid memory size')
 
-        self.info['memory_static_max'] = limit
+        MiB = 1024 * 1024
+        self.info['memory_static_max'] = limit * MiB
+
         if self.domid >= 0:
             maxmem = int(limit) * 1024
             try:
@@ -607,7 +609,7 @@ class XendDomainInfo:
             except Exception, ex:
                 raise XendError(str(ex))
         else:
-            self.info['memory_dynamic_max'] = limit
+            self.info['memory_dynamic_max'] = limit * MiB
             xen.xend.XendDomain.instance().managed_config_save(self)
 
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix the xm mem-max command. Closes bug #933., Xen patchbot-unstable <=