Skip to contentSkip to conversation

Remove redundant check of maximum memory size

PATCH New Masaki Kanno 1 participant 1 message Feb 12, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove redundant check of maximum memory size

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?

Best regards,
Kan

tools/python/xen/xend/XendDomainInfo.py Tue Feb 12 15:01:46 2008 +0900 renamed from tools/python/xen/xend/XendDomainInfo.py Mon Feb 11 15:59:49 2008 +0000 +0 -3
diff -r 2a3111016f88 tools/python/xen/xend/XendDomainInfo.py
@@ -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)