-icount increases boot time by >10x
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When I specify the -icount option, some guest operations such as booting a Linux kernel take more than 10 times longer than otherwise. For example, the following will boot Aboriginal Linux to the login prompt about 6 seconds on my system (using TCG, not KVM):
wget http://
gunzip <system-
cd system-image-i686
sh run-emulator.sh
If I replace the last line with
QEMU_EXTRA="-icount shift=auto" sh run-emulator.sh
booting to the login prompt takes about 1 minute 20 seconds.
I have tried different values for "shift" other than the "auto" used above, but have not been able to find one that gives reasonable performance. Specifying "sleep=off" also did not help.
During the slow boots, qemu appears to spend most of its time sleeping, not using the host CPU.
I see this with multiple versions of qemu, including current git sources (c181ddaa176856
Changed in qemu: | |
status: | Fix Committed → Fix Released |
Yes, I can reproduce this. Also, interestingly, with the -icount version when I typed 'exit' to quit the guest I got this abort:
qemu: fatal: cpu_io_recompile: could not find TB for pc=0x7fcd0aae636e 000000 000000 0000 FPR1=0000000000 000000 0000 000000 0000 FPR3=0000000000 000000 0000 000000 0000 FPR5=0000000000 000000 0000 000000 0000 FPR7=ec00000000 000000 4006 000000000000000 00000000 XMM01=000000000 000000000000000 00000000 000000000000000 00000000 XMM03=000000000 000000000000000 00000000 000000000000000 00000000 XMM05=000000000 000000000000000 00000000 000000000000000 00000000 XMM07=000000000 000000000000000 00000000
EAX=c88053a4 EBX=00000069 ECX=c00211a4 EDX=00000000
ESI=c7812180 EDI=c78126f0 EBP=0000000f ESP=c7a0de44
EIP=c11ada30 EFL=00000287 [--S--PC] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =007b 00000000 ffffffff 00cff300 DPL=3 DS [-WA]
CS =0060 00000000 ffffffff 00cf9a00 DPL=0 CS32 [-R-]
SS =0068 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
DS =007b 00000000 ffffffff 00cff300 DPL=3 DS [-WA]
FS =0000 00000000 00000000 00000000
GS =0033 080a130c ffffffff 00dff300 DPL=3 DS [-WA]
LDT=0000 00000000 00000000 00008200 DPL=0 LDT
TR =0080 c12fbe60 0000206b 00008900 DPL=0 TSS32-avl
GDT= c12f6000 000000ff
IDT= ffffc000 000007ff
CR0=8005003b CR2=09d40ffc CR3=07a08000 CR4=00000690
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000
DR6=ffff0ff0 DR7=00000400
CCS=c8800000 CCD=c8805200 CCO=SUBL
EFER=0000000000
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000
FPR2=0000000000
FPR4=0000000000
FPR6=0000000000
XMM00=000000000
XMM02=000000000
XMM04=000000000
XMM06=000000000
Aborted (core dumped)