save guest running time is more than 450s with AVX running.

Bug #1261268 reported by chao zhou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Unassigned

Bug Description

Environment:
------------
Host OS (ia32/ia32e/IA64):ia32e
Guest OS (ia32/ia32e/IA64):ia32e
Guest OS Type (Linux/Windows):linux
kvm.git Commit:d6d63b51fe3bfea0cf596993afa480b0b3b02c32
qemu.git Commit:8f84271da83c0e9f92aa7c1c2d0d3875bf0a5cb8
Host Kernel Version:3.13.0-rc1
Hardware:Romley_EP, Ivytown_EP

Bug detailed description:
--------------------------
when guest running avx , then do save /restore, save guest running time is too lomg

Note:
1.when save guest (migrate "exec:dd of=test.img")sometimes , the file of test.img is 29G, running time of save guest is about 900s
2. this should be a qemu bug:
kvm + qemu = result
d6d63b51 + 8f84271d = bad
d6d63b51 + b5d54bd4 = good

Reproduce steps:
----------------
1.qemu-system-x86_64 -enable-kvm -m 1024 -smp 6 -net nic,macaddr=00:12:34:43:14:78 -net tap,script=/etc/kvm/qemu-ifup rhel6u4.qcow
2. scp /usr/tet/XVS/tsets/control_panel/tools/bin/avx.tar.gz $guest_IP:/root
3. tar -zxf avx.tar.gz
4. cd /avx
5. sh chk_avx.sh &>/dev/null &
6. ctrl-alt-2
7. migrate "exec:dd of=test.img"

Current result:
----------------
running time of save guest is more than 450s

Expected result:
----------------
running time of save guest is less than 450s

Basic root-causing log:
----------------------

Revision history for this message
chao zhou (chao-zhou) wrote :

 the first bad commit is:
commit 6887581728c9eddf858e7458b6eacbfe3ac68302
Author: Gerd Hoffmann <email address hidden>
Date: Fri Sep 20 15:34:27 2013 +0200

    roms: add 'make clean'

    Signed-off-by: Gerd Hoffmann <email address hidden>

Revision history for this message
Paolo Bonzini (bonzini) wrote :

The bisection is probably incorrect.

Revision history for this message
chao zhou (chao-zhou) wrote :

after re-check , the first bad commit is:
commit 3e469dbfe413c25d48321c3a19ddfae0727dc6e5
Author: Andrea Arcangeli <email address hidden>
Date: Thu Jul 25 12:11:15 2013 +0200

    exec: always use MADV_DONTFORK

    MADV_DONTFORK prevents fork to fail with -ENOMEM if the default
    overcommit heuristics decides there's too much anonymous virtual
    memory allocated. If the KVM secondary MMU is synchronized with MMU
    notifiers or not, doesn't make a difference in that regard.

    Secondly it's always more efficient to avoid copying the guest
    physical address space in the fork child (so we avoid to mark all the
    guest memory readonly in the parent and so we skip the establishment
    and teardown of lots of pagetables in the child).

    In the common case we can ignore the error if MADV_DONTFORK is not
    available. Leave a second invocation that errors out in the KVM path
    if MMU notifiers are missing and KVM is enabled, to abort in such
    case.

    Signed-off-by: Andrea Arcangeli <email address hidden>
    Tested-By: Benoit Canet <email address hidden>
    Acked-by: Paolo Bonzini <email address hidden>
    Signed-off-by: Gleb Natapov <email address hidden>

Revision history for this message
chao zhou (chao-zhou) wrote :

kvm.git + qemu.git:7cbb39d4_5913815a
after use "stop" , then migrate "exec:dd of=test.img", the test.img is about 250M, running time of save guest is less than 450s.

Changed in qemu:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.