* [PATCH] [Bug 933] Fix the xm mem-max command
@ 2007-03-26 6:16 Masaki Kanno
2007-03-26 13:04 ` Ewan Mellor
0 siblings, 1 reply; 2+ messages in thread
From: Masaki Kanno @ 2007-03-26 6:16 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 856 bytes --]
Hi,
I fixed the Xen bugzilla 933 and other bug.
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=933
BTW, I tested the xm mem-max command with attached patch.
The "maxmem" and the "memory" were changed as follows by the
xm mem-max command. Is the result specification? or
bug? I thought that the result is bug, so I tried to remove
the line of "self.info['memory_dynamic_max'] = limit * MiB"
in setMemoryMaximum(). As the result, only the "maxmem" was
changed by the xm mem-max command. Am I right?
# xm new /xen/vm1.conf
Using config file "/xen/vm1.conf".
# xm list --long vm1 | grep mem
(maxmem 384)
(memory 256)
(shadow_memory 0)
# xm mem-max vm1 512
# xm list --long vm1 | grep mem
(maxmem 512)
(memory 512)
(shadow_memory 0)
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Best regards,
Kan
[-- Attachment #2: xm_memmax.patch --]
[-- Type: application/octet-stream, Size: 1256 bytes --]
diff -r dccb274295ae tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Mon Mar 26 01:13:16 2007 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py Mon Mar 26 14:28:03 2007 +0900
@@ -592,13 +592,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:
@@ -606,7 +608,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)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [Bug 933] Fix the xm mem-max command
2007-03-26 6:16 [PATCH] [Bug 933] Fix the xm mem-max command Masaki Kanno
@ 2007-03-26 13:04 ` Ewan Mellor
0 siblings, 0 replies; 2+ messages in thread
From: Ewan Mellor @ 2007-03-26 13:04 UTC (permalink / raw)
To: Masaki Kanno; +Cc: xen-devel
On Mon, Mar 26, 2007 at 03:16:55PM +0900, Masaki Kanno wrote:
Content-Description: Mail message body
> Hi,
>
> I fixed the Xen bugzilla 933 and other bug.
> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=933
Applied, thank you.
> BTW, I tested the xm mem-max command with attached patch.
> The "maxmem" and the "memory" were changed as follows by the
> xm mem-max command. Is the result specification? or
> bug? I thought that the result is bug, so I tried to remove
> the line of "self.info['memory_dynamic_max'] = limit * MiB"
> in setMemoryMaximum(). As the result, only the "maxmem" was
> changed by the xm mem-max command. Am I right?
Yes, I think you are right -- only the static_max value should be set. I'll
fix this -- thanks.
Ewan.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-26 13:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-26 6:16 [PATCH] [Bug 933] Fix the xm mem-max command Masaki Kanno
2007-03-26 13:04 ` Ewan Mellor
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.