qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC 0/9] Introduce light weight PC platform pc-lite


From: Chao Peng
Subject: Re: [Qemu-devel] [RFC 0/9] Introduce light weight PC platform pc-lite
Date: Tue, 28 Jun 2016 17:27:32 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

> 
> qboot does basically four things: 1) relocate from ROM to 0xf0000; 2)
> initialize PCI; 2) provide the ACPI and e820 tables; 3) boot.
> 
> If Linux can boot without initializing PCI bridges and without INTX, we
> can remove that code from qboot.  The PCI scan is the most expensive
> part, I think.  (2) and (3) are the same no matter if you run them in
> QEMU or the guest.
> 
> That leaves out only relocation (PAM).

Yes, most 'overhead' comes from PCI stuff, fw_cfg related and PAM.

> 
> > Every little bit boot time saving is important because
> > we are trying to achieve comparable result with that for Linux native
> > container.
> > 
> > With this usage model, I doubt introducing a firmware layer is a good
> > idea:
> > 
> >     On one side, even with optimized and compact qboot it still takes us
> >     ~15ms.
> 
> Have you profiled it?  If it is code in QEMU that we can optimize (e.g.
> memory.c), that would benefit all guests.

Most optimizations are not helpful for traditional guests (because
there is functionalities missing), but there does exist some. For
example, PAM for Q35 emulation contains 12 memory regions (info mtree).
We can merge them into 1 to reduce loop time (even helpful for other
memory regions access when PAM is disabled).

> 
> >     This is not a small value because current Linux kernel takes
> >     only ~50ms (and we are still on the way to optimize it). And when
> >     you look at the SeaBIOS or qboot, almost all the code are useless for
> >     this usage model. They are doing things that is important for
> >     traditional PC booting but cost 15ms doing useless things for us (It
> >     is really not easy to save 15ms in other place, for example, in
> >     Linux. Personally I tend to change the architecture for this new
> >     usage model, e.g. eliminate firmware).
> > 
> >     On the other side, even boot the new pc-lite platform with firmware,
> >     it does not mean it can support non-Linux system like Windows. So
> >     generally I don't see the benefit of introducing a firmware layer.
> 
> The main benefit is maintainability, by reducing the amount of code
> specific to pc-lite.

Understand.

Chao



reply via email to

[Prev in Thread] Current Thread [Next in Thread]