[SeaBIOS] SeaBIOS booting time optimization
sgarzare at redhat.com
Fri Nov 16 17:13:59 CET 2018
I'm investigating the SeaBIOS booting time, to understand if we can reduce
the boot time in some cases (e.g. legacy hardware is not needed). I think
can be interesting also for NEMU developers.
Following this thread (
I'm using qboot (https://github.com/bonzini/qboot) to compare the SeaBIOS
As Paolo did in qboot, I manually add small debug port writes in SeaBIOS and
linuxboot_dma.c (QEMU) to trace the events with perf (kvm_pio events)
The goal is to have only one image of SeaBIOS configurable at runtime to
the boot time, avoiding unnecessary initialization.
Any pointers or suggestions would be helpful.
Following I put some preliminary measurements that I obtained:
I used this QEMU command line:
./qemu-system-x86_64 -bios $BIOS -m 1G -cpu host -M accel=kvm \
-kernel /boot/vmlinuz-4.18.18-300.fc29.x86_64 -append 'console=ttyS0' \
-nographic -serial mon:stdio
For each test, I measured these times (in milliseconds) relative to the
- qemu_init_end: first kvm_entry (i.e. QEMU initialized has finished)
- fw_start: first entry of the BIOS
- fw_do_boot: after the BIOS initialization (e.g. PCI setup, etc.)
- linux_start_boot: before the jump to the Linux kernel
fw_start: 40.721729 (+0.160495)
fw_do_boot: 47.025591 (+6.303862)
linux_start_boot: 48.874112 (+1.848521)
# SeaBIOS with default configuration
fw_start: 40.639967 (+0.220516)
fw_do_boot: 886.668828 (+846.028861)
linux_start_boot: 889.723547 (+3.054719)
# SeaBIOS with Kevin's configuration
# Note: this SeaBIOS setup is so stripped down that it can't actually boot
fw_start: 40.755757 (+0.079345)
fw_do_boot: 56.427023 (+15.671266)
I did the same tests also with NEMU (without using -M virt) and I have
approximately the same results.
As the next step, I'll start from Kevin's configuration to have a minimal
SeaBIOS image ables to boot a Linux kernel.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SeaBIOS