From: Zhigang Wang <zhigang.x.wang@oracle.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH]xl: make mem-set and mem-max to use MB for memory unit by default.
Date: Fri, 04 Jun 2010 09:54:46 +0800 [thread overview]
Message-ID: <4C085CE6.30106@oracle.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 209 bytes --]
Hi all,
As the memory size is huge today and for backward compatibility with xm, I
recommend to use MB by default.
if use KB, a xl mem-set 0 1024 will invoke oom-killer and make dom0 hang.
Thanks,
Zhigang
[-- Attachment #2: xen-libxl-mem-set-max-default-mb.patch --]
[-- Type: text/plain, Size: 1564 bytes --]
xl: make mem-set and mem-max to use MB for memory unit by default.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
diff -r 4ab68bf4c37e tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Thu Jun 03 07:30:54 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c Fri Jun 04 09:44:48 2010 +0800
@@ -1232,9 +1232,9 @@
kbytes <<= 10;
case 'g':
kbytes <<= 10;
+ case '\0':
case 'm':
kbytes <<= 10;
- case '\0':
case 'k':
break;
case 'b':
@@ -1295,7 +1295,6 @@
exit(1);
}
- printf("setting domid %d static max memory to : %s\n", domid, mem);
exit(0);
}
@@ -1311,7 +1310,6 @@
exit(3);
}
- printf("setting domid %d memory to : %lld\n", domid, memorykb);
libxl_set_memory_target(&ctx, domid, memorykb, /* enforce */ 1);
}
diff -r 4ab68bf4c37e tools/libxl/xl_cmdtable.c
--- a/tools/libxl/xl_cmdtable.c Thu Jun 03 07:30:54 2010 +0100
+++ b/tools/libxl/xl_cmdtable.c Fri Jun 04 09:44:48 2010 +0800
@@ -121,12 +121,12 @@
{ "mem-max",
&main_memmax,
"Set the maximum amount reservation for a domain",
- "<Domain> <MemKB['b'[bytes]|'k'[KB]|'m'[MB]|'g'[GB]|'t'[TB]]>",
+ "<Domain> <MemMB['b'[bytes]|'k'[KB]|'m'[MB]|'g'[GB]|'t'[TB]]>",
},
{ "mem-set",
&main_memset,
"Set the current memory usage for a domain",
- "<Domain> <MemKB['b'[bytes]|'k'[KB]|'m'[MB]|'g'[GB]|'t'[TB]]>",
+ "<Domain> <MemMB['b'[bytes]|'k'[KB]|'m'[MB]|'g'[GB]|'t'[TB]]>",
},
{ "button-press",
&main_button_press,
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2010-06-04 1:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C085CE6.30106@oracle.com \
--to=zhigang.x.wang@oracle.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.