
于 2011年03月03日 13:25, KAMEZAWA Hiroyuki 写道:
I found this when I used virsh memtune...
Happened to see a bug for this yesterday.
BTW, how to fix http://libvirt.org/formatdomain.html 's memtune description ?
How about be consitent with what cgroup doc says? :-) http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=blob;f=Docum...
==
From 541ae04430f376e8168b413a20b35dce49779816 Mon Sep 17 00:00:00 2001 From: KAMEZAWA Hiroyuki<kamezawa.hiroyu@jp.fujitsu.com> Date: Thu, 3 Mar 2011 14:24:45 +0900 Subject: [PATCH 6/6] fix virsh commands' message for memtune'swap_hard_limit.
cgroup's /cgroup/memory/memory.memsw.limit_in_bytes is not for limitinit 'swap' but for 'memory+swap' (then, it's memsw) (So, this number cannot be smaller than memory.limit_in_bytes)
Yes, that's what BZ about.
Note: If other hypervisors than Linux support this and meaning is not same as memory+swap, the name swap_hard_limit will have confusion.
Currently, only LXC and QEMU driver support "swap_hard_limit" using cgroup, ESX just support setting "min_guarantee", so perhaps renaming "swap_hard_limit" to something like "memswap_hard_limit" is a good idea?
Signed-off-by: KAMEZAWA Hiroyuki<kamezawa.hiroyu@jp.fujitsu.com> --- tools/virsh.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c index 62fca17..3a8fdaa 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -3033,7 +3033,7 @@ static const vshCmdOptDef opts_memtune[] = { {"soft-limit", VSH_OT_INT, VSH_OFLAG_NONE, N_("Memory during contention in kilobytes")}, {"swap-hard-limit", VSH_OT_INT, VSH_OFLAG_NONE, - N_("Max swap in kilobytes")}, + N_("Max memory+swap in kilobytes")}, {"min-guarantee", VSH_OT_INT, VSH_OFLAG_NONE, N_("Min guaranteed memory in kilobytes")}, {NULL, 0, 0, NULL}