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] Remove redundant check of maximum memory size

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Remove redundant check of maximum memory size
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Tue, 12 Feb 2008 18:06:45 +0900
Delivery-date: Tue, 12 Feb 2008 01:07:26 -0800
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
Hi,

Currently, a wrong value of maximum memory size is checked by 
_safe_set_memory() and _memory_sanity_check().  I think that the 
following codes are redundant. 

BTW, we can set current memory size of domains greater than physical 
memory size of machines by xm mem-set command.  Maximum memory size 
also is same by xm mem-max command.  Do you have a plan to make an 
error of the xm commands if memory size greater than physical memory 
size of machines was required?  Or is the behavior of the xm commands 
specification?

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Best regards,
 Kan

diff -r 2a3111016f88 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Feb 11 15:59:49 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Feb 12 15:01:46 2008 +0900
@@ -707,9 +707,6 @@ class XendDomainInfo:
         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')
-
         MiB = 1024 * 1024
         self._safe_set_memory('memory_static_max', limit * MiB)
 



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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Remove redundant check of maximum memory size, Masaki Kanno <=