All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] SeaBIOS booting time optimization
@ 2018-11-16 16:13 Stefano Garzarella
  2018-11-16 16:39 ` Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Stefano Garzarella @ 2018-11-16 16:13 UTC (permalink / raw)
  To: seabios
  Cc: qemu-devel, Rob Bradford, Samuel Ortiz, Stefan Hajnoczi, Paolo Bonzini

Hi,
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
this
can be interesting also for NEMU developers.

Following this thread (
https://mail.coreboot.org/pipermail/seabios/2015-July/009497.html),
I'm using qboot (https://github.com/bonzini/qboot) to compare the SeaBIOS
booting time.

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
reduce
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
"sched_process_exec" event:
- 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

# qboot
BIOS=/home/stefano/repos/qboot/bios.bin
 qemu_init_end: 40.561234
 fw_start: 40.721729 (+0.160495)
 fw_do_boot: 47.025591 (+6.303862)
 linux_start_boot: 48.874112 (+1.848521)

# SeaBIOS with default configuration
BIOS=/home/stefano/repos/seabios/out_default/bios.bin
 qemu_init_end: 40.419451
 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
# (https://mail.coreboot.org/pipermail/seabios/2015-July/009508.html)
# Note: this SeaBIOS setup is so stripped down that it can't actually boot
an OS
BIOS=/home/stefano/repos/seabios/out_kevin/bios.bin
 qemu_init_end: 40.676412
 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.

Thanks,
Stefano

-- 
Stefano Garzarella
Red Hat

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2018-11-28  2:08 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-16 16:13 [Qemu-devel] SeaBIOS booting time optimization Stefano Garzarella
2018-11-16 16:39 ` Stefan Hajnoczi
2018-11-18 23:09   ` Samuel Ortiz
2018-11-18 23:31 ` Samuel Ortiz
2018-11-19 10:01   ` Stefano Garzarella
2018-11-19  8:48 ` Gerd Hoffmann
2018-11-19 10:42   ` Stefano Garzarella
2018-11-19 13:07     ` Stefan Hajnoczi
2018-11-19 14:15       ` Gerd Hoffmann
2018-11-19 18:38         ` Stefano Garzarella
2018-11-20  6:21           ` Gerd Hoffmann
2018-11-20  9:45             ` Stefano Garzarella
2018-11-20 11:22               ` Gerd Hoffmann
2018-11-22 11:08                 ` Stefano Garzarella
2018-11-22 11:51                   ` Gerd Hoffmann
2018-11-22 15:13                     ` Stefano Garzarella
2018-11-23  6:21                       ` Gerd Hoffmann
2018-11-23 11:18                         ` Stefano Garzarella
2018-11-23 15:54                           ` Kevin O'Connor
2018-11-23 16:30                             ` Stefano Garzarella
2018-11-20 15:55           ` [Qemu-devel] [SeaBIOS] " Kevin O'Connor
2018-11-20 16:13             ` Steve Douthit
2018-11-20 16:51               ` Stefano Garzarella
2018-11-21  5:43                 ` Stefan Berger
2018-11-28  2:08                   ` Kevin O'Connor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.