Bug 572104 - Fedora's build of qemu includes PXE ROMs which induce 9 second delay in boot
Summary: Fedora's build of qemu includes PXE ROMs which induce 9 second delay in boot
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Justin M. Forbes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-10 09:59 UTC by Richard W.M. Jones
Modified: 2013-01-09 11:31 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-02 17:13:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2010-03-10 09:59:25 UTC
Description of problem:

Fedora's build of qemu includes gPXE and pxe-virtio.bin ROMs.  Together
these ROMs add a useless 9 second delay in the boot time.  If you remove
them manually (ie. rm -r /usr/share/gpxe; rm /usr/share/qemu/pxe-virtio.bin)
then that shaves 9 seconds off the BIOS boot time, reducing the BIOS part
to under a second.

Version-Release number of selected component (if applicable):

qemu-system-x86-0.12.3-3.fc13.i686
gpxe-roms-qemu-1.0.0-1.fc13.noarch

How reproducible:

Always.

Steps to Reproduce:

time qemu-kvm \
  -kernel /boot/vmlinuz-2.6.33-1.fc13.i686.PAE \
  -no-reboot -nodefaults -nographic -serial stdio \
  -append "panic=1 console=ttyS0" -m 256 \
  -net user,vlan=0,net=10.0.2.0/8 -net nic,model=virtio,vlan=0

rm -r /usr/share/gpxe; rm /usr/share/qemu/pxe-virtio.bin

Repeat the above qemu-kvm command, and notice greatly
reduced boot time.
  
Actual results:

Long (9 second) pause while the option ROMs wait
for something or other.

Expected results:

Just boot, dammit!!

Additional info:

Comment 1 Ruben Kerkhof 2010-03-11 19:30:33 UTC
The delay is caused by the banner that gpxe displays.

Setting #define BANNER_TIMEOUT 0 in src/config/general.h should be all that's needed.

Booting is pretty fast now

[ruben@phy003 ~]$ time qemu-kvm -kernel /boot/vmlinuz-2.6.32.9-67.fc12.x86_64 -nodefaults -nographic -serial stdio -append 'panic=1 console=ttyS0' -m 256 -no-reboot >/dev/null

real	0m2.473s
user	0m1.489s
sys	0m0.346s

Comment 2 Richard W.M. Jones 2010-03-11 22:05:54 UTC
(In reply to comment #1)

> [ruben@phy003 ~]$ time qemu-kvm -kernel /boot/vmlinuz-2.6.32.9-67.fc12.x86_64
> -nodefaults -nographic -serial stdio -append 'panic=1 console=ttyS0' -m 256
> -no-reboot >/dev/null

You need to add the -net ... parameters too, otherwise the troublesome
pxe-virtio.bin ROM isn't loaded (another 4-5 seconds delay).  I don't
think BANNER_TIMEOUT is the whole story.

Comment 3 Ruben Kerkhof 2010-03-17 16:19:51 UTC
Ok, here are my timings with the -net parameter added.
Strace shows that the option rom is loaded (twice?)

[ruben@phy003 ~]$ time strace -etrace=file qemu-kvm -kernel /boot/vmlinuz-2.6.32.9-70.fc12.x86_64 -no-reboot -nodefaults -nographic -serial stdio -append "panic=1 console=ttyS0,115200n8" -m 256 -net user,vlan=0,net=10.0.2.0/8 -net nic,model=virtio,vlan=0 >/dev/null

readlink("/proc/self/exe", "/usr/bin/qemu-kvm", 4095) = 17
access("/usr/share/qemu", R_OK)         = 0
open("/dev/kvm", O_RDWR)                = 3
access("/usr/share/qemu/bios.bin", R_OK) = 0
open("/usr/share/qemu/bios.bin", O_RDONLY) = 8
access("/usr/share/qemu/bios.bin", R_OK) = 0
open("/usr/share/qemu/bios.bin", O_RDONLY) = 8
open("/boot/vmlinuz-2.6.32.9-70.fc12.x86_64", O_RDONLY) = 8
access("/usr/share/qemu/vapic.bin", R_OK) = 0
open("/usr/share/qemu/vapic.bin", O_RDONLY) = 8
access("/usr/share/qemu/linuxboot.bin", R_OK) = 0
open("/usr/share/qemu/linuxboot.bin", O_RDONLY) = 8
open("/etc/localtime", O_RDONLY)        = 8
access("/usr/share/qemu/pxe-virtio.bin", R_OK) = 0
open("/usr/share/qemu/pxe-virtio.bin", O_RDONLY) = 8
open("/usr/share/qemu/pxe-virtio.bin", O_RDONLY) = 8
--- SIGALRM (Alarm clock) @ 0 (0) ---

real    0m2.548s
user    0m1.512s
sys     0m0.377s

And if I remove the pxe roms:

readlink("/proc/self/exe", "/usr/bin/qemu-kvm", 4095) = 17
access("/usr/share/qemu", R_OK)         = 0
open("/dev/kvm", O_RDWR)                = 3
access("/usr/share/qemu/bios.bin", R_OK) = 0
open("/usr/share/qemu/bios.bin", O_RDONLY) = 8
access("/usr/share/qemu/bios.bin", R_OK) = 0
open("/usr/share/qemu/bios.bin", O_RDONLY) = 8
open("/boot/vmlinuz-2.6.32.9-70.fc12.x86_64", O_RDONLY) = 8
access("/usr/share/qemu/vapic.bin", R_OK) = 0
open("/usr/share/qemu/vapic.bin", O_RDONLY) = 8
access("/usr/share/qemu/linuxboot.bin", R_OK) = 0
open("/usr/share/qemu/linuxboot.bin", O_RDONLY) = 8
open("/etc/localtime", O_RDONLY)        = 8
access("/usr/share/qemu/pxe-virtio.bin", R_OK) = -1 ENOENT (No such file or directory)
open("pxe-virtio.bin", O_RDONLY)        = -1 ENOENT (No such file or directory)
pci_add_option_rom: failed to find romfile "pxe-virtio.bin"
--- SIGALRM (Alarm clock) @ 0 (0) ---

real    0m2.455s
user    0m1.453s
sys     0m0.377s

Comment 4 Bug Zapper 2011-06-02 16:15:15 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Richard W.M. Jones 2011-06-02 17:13:27 UTC
This has fixed itself, so closing.


Note You need to log in before you can comment on or make changes to this bug.