]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Adaptive timeout for connecting to monitor
authorMichal Privoznik <mprivozn@redhat.com>
Sat, 11 Mar 2017 06:23:42 +0000 (07:23 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 16 Mar 2017 08:21:39 +0000 (09:21 +0100)
commit85af0b803cd19a03f71bd01ab4e045552410368f
tree71e02bd25bbb34b45ea60f649f08c5848acdbed2
parent67dcb797ed7f1fbb048aa47006576f424923933b
qemu: Adaptive timeout for connecting to monitor

There were couple of reports on the list (e.g. [1]) that guests
with huge amounts of RAM are unable to start because libvirt
kills qemu in the initialization phase. The problem is that if
guest is configured to use hugepages kernel has to zero them all
out before handing over to qemu process. For instance, 402GiB
worth of 1GiB pages took around 105 seconds (~3.8GiB/s). Since we
do not want to make the timeout for connecting to monitor
configurable, we have to teach libvirt to count with this
fact. This commit implements "1s per each 1GiB of RAM" approach
as suggested here [2].

1: https://www.redhat.com/archives/libvir-list/2017-March/msg00373.html
2: https://www.redhat.com/archives/libvir-list/2017-March/msg00405.html

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_process.c
tests/qemumonitortestutils.c