From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT71y-0006ky-Ne for qemu-devel@nongnu.org; Wed, 04 Mar 2015 05:59:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YT71s-0005RE-UL for qemu-devel@nongnu.org; Wed, 04 Mar 2015 05:59:58 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:41366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT71s-0005Qt-6G for qemu-devel@nongnu.org; Wed, 04 Mar 2015 05:59:52 -0500 From: zhanghailiang Date: Wed, 4 Mar 2015 18:59:33 +0800 Message-ID: <1425466773-8532-1-git-send-email-zhang.zhanghailiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH] vl: Adjust the place of processing '-mon' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, arei.gonglei@huawei.com, peter.huangpeng@huawei.com, Xiangyou Xie , zhanghailiang From: Xiangyou Xie If VM is configured with large size of hugepage, when startup, it will consume lots of time to zero the hugepage memory in the function 'os_mem_prealloc'. Libvirtd will wait 30 seconds for qemu to establish the monitor, If the timeout triggers, libvirtd will send TERM signal to kill qemu. To solve the problem, adjust the processing of '-mon' to the ahead of '-object'. Signed-off-by: Xiangyou Xie Signed-off-by: zhanghailiang --- vl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 86bdce0..d0c03fe 100644 --- a/vl.c +++ b/vl.c @@ -4000,6 +4000,10 @@ int main(int argc, char **argv, char **envp) exit(0); } + if (qemu_opts_foreach(qemu_find_opts("mon"), mon_init_func, NULL, 1) != 0) { + exit(1); + } + if (qemu_opts_foreach(qemu_find_opts("object"), object_create, NULL, 0) != 0) { exit(1); @@ -4154,10 +4158,6 @@ int main(int argc, char **argv, char **envp) parse_numa_opts(); - if (qemu_opts_foreach(qemu_find_opts("mon"), mon_init_func, NULL, 1) != 0) { - exit(1); - } - if (foreach_device_config(DEV_SERIAL, serial_parse) < 0) exit(1); if (foreach_device_config(DEV_PARALLEL, parallel_parse) < 0) -- 1.7.12.4