From: "Richard W.M. Jones" <rjones@redhat.com>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: marc.mari.barcelo@gmail.com, Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>
Subject: Re: [Qemu-devel] Why is SeaBIOS used with -kernel?
Date: Fri, 1 Apr 2016 21:46:05 +0100 [thread overview]
Message-ID: <20160401204605.GR32728@redhat.com> (raw)
In-Reply-To: <20160401200546.GA19187@morn.lan>
On Fri, Apr 01, 2016 at 04:05:46PM -0400, Kevin O'Connor wrote:
> On Fri, Apr 01, 2016 at 07:41:31PM +0100, Richard W.M. Jones wrote:
> > On Fri, Apr 01, 2016 at 11:35:40AM -0400, Kevin O'Connor wrote:
> > > > +# general stuff
> > > > +CONFIG_QEMU=y
> > > > +CONFIG_ROM_SIZE=128
> > >
> > > Why force a size of 128K - I would think 64K would be fine.
> >
> > Agreed. Setting this to =0 seems the best thing, and it does fit fine
> > inside 64K.
> >
> > > > +# no input, no boot menu
> > > > +CONFIG_MOUSE=n
> > > > +CONFIG_KEYBOARD=n
> > > [...]
> > > > +CONFIG_DRIVES=n
> > >
> > > I would not recommended disabling CONFIG_MOUSE, CONFIG_KEYBOARD,
> > > CONFIG_DRIVES - I only had those in my config so as to avoid having to
> > > specify all the device drivers. Ideally these would remain on and the
> > > individual device drivers would be disabled.
> >
> > We are always use this in a virtual appliance. Interaction with the
> > user is both impossible and undesirable. It either boots or not, and
> > the whole appliance is discarded in seconds. We're always using
> > -kernel with this SeaBIOS build, so probing drives is never needed.
>
> Okay, but if it doesn't change the boot time, then it would be nicer
> to use a standard rom for all boots.
I don't think I know which option (or options) make the boot faster,
but bios-fast.bin is certainly much faster than the qemu standard
bios.bin -- no amount of variability in the test framework would
account for that huge difference of 44ms.
I had convinced myself before that maybe CONFIG_DRIVES=n was the
factor, but that setting alone doesn't actually make much difference:
bios-fast.bin (CONFIG_DRIVES=n):
Result: 1093.3ms ±3.4ms
Result: 1100.6ms ±8.9ms
bios-fast.bin + CONFIG_DRIVES=y:
Result: 1100.3ms ±8.4ms
Result: 1101.7ms ±1.2ms
It could be just one setting or an accumulation of several settings.
At some point I may have the patience to try each one but probably not
late on Friday night :-/
> I looked closer at your setup and it appears the SeaBIOS virtio-scsi
> driver is very slow because it does a full search of all 256 possible
> scsi targets. This full scan takes a lot of time. I put together a
> quick patch (see below) to stop the scan early. Gerd/Paulo, do you
> know if what I've done is valid and/or if there is a better way we can
> limit the virtio-scsi scan?
>
> I also found a way to reduce the overhead of the "shadow ram" code a
> little. I have a patch (see below) for that as well.
I would say the patches on the KevinOConnor/testing branch don't make
any measurable difference.
Stock qemu SeaBIOS:
Result: 1218.6ms ±1.0ms
Result: 1214.1ms ±0.0ms
KevinOConnor/testing branch:
Result: 1221.9ms ±0.5ms
Result: 1216.4ms ±0.2ms
> Another consumer of time is ACPI table deployment. I wonder if you
> could get similar results by running QEMU with "-no-acpi"?
No apparent difference:
Stock qemu SeaBIOS:
Result: 1211.5ms ±4.8ms
Stock qemu SeaBIOS + qemu -no-acpi:
Result: 1213.9ms ±6.5ms
> Beyond that, I think the only other big time consumers of the default
> seabios is debug messages. If so, then I think we can come up with a
> way to limit these debug messages in SeaBIOS.
>
> The SeaBIOS testing patches are at:
>
> https://github.com/KevinOConnor/seabios/tree/testing
Thanks,
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
next prev parent reply other threads:[~2016-04-01 20:46 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-19 20:31 [Qemu-devel] Why is SeaBIOS used with -kernel? Richard W.M. Jones
2016-03-21 7:58 ` Gerd Hoffmann
2016-03-21 8:37 ` Richard W.M. Jones
2016-03-21 9:40 ` Gerd Hoffmann
2016-03-31 9:21 ` Stefan Hajnoczi
2016-03-31 16:22 ` Kevin O'Connor
[not found] ` <20160331221039.GA32728@redhat.com>
2016-03-31 22:17 ` Richard W.M. Jones
2016-03-31 22:44 ` Kevin O'Connor
2016-04-01 7:55 ` Richard W.M. Jones
2016-04-01 8:03 ` Paolo Bonzini
2016-04-01 8:47 ` Richard W.M. Jones
2016-04-01 8:51 ` Paolo Bonzini
2016-04-01 8:57 ` Richard W.M. Jones
2016-04-01 9:05 ` Paolo Bonzini
2016-04-01 8:02 ` Richard W.M. Jones
2016-04-01 8:11 ` Paolo Bonzini
2016-04-01 8:14 ` Richard W.M. Jones
2016-04-01 8:24 ` Paolo Bonzini
2016-04-01 8:44 ` Richard W.M. Jones
2016-04-01 8:47 ` Paolo Bonzini
2016-04-01 8:49 ` Vasiliy Tolstov
2016-04-01 9:16 ` Dr. David Alan Gilbert
2016-04-01 9:18 ` Gerd Hoffmann
2016-04-01 10:17 ` Richard W.M. Jones
2016-04-01 11:07 ` Gerd Hoffmann
2016-04-01 11:11 ` Richard W.M. Jones
2016-04-01 11:20 ` Richard W.M. Jones
2016-04-01 11:21 ` Paolo Bonzini
2016-04-01 11:26 ` Richard W.M. Jones
2016-04-05 4:38 ` Kevin Wolf
2016-04-05 8:04 ` Richard W.M. Jones
2016-04-05 8:11 ` Kevin Wolf
2016-04-05 9:19 ` Richard W.M. Jones
2016-04-05 9:26 ` Kevin Wolf
2016-04-01 11:32 ` Gerd Hoffmann
2016-04-01 11:49 ` Richard W.M. Jones
2016-04-01 15:35 ` Kevin O'Connor
2016-04-01 16:03 ` Paolo Bonzini
2016-04-01 18:41 ` Richard W.M. Jones
2016-04-01 18:59 ` Richard W.M. Jones
2016-04-01 19:04 ` Kevin O'Connor
2016-04-01 19:10 ` Richard W.M. Jones
2016-04-01 19:15 ` Richard W.M. Jones
2016-04-01 19:44 ` Kevin O'Connor
2016-04-01 20:25 ` Richard W.M. Jones
2016-04-01 20:05 ` Kevin O'Connor
2016-04-01 20:46 ` Richard W.M. Jones [this message]
2016-04-01 22:25 ` Kevin O'Connor
2016-04-02 7:51 ` Richard W.M. Jones
2016-04-02 5:30 ` Paolo Bonzini
2016-04-01 15:08 ` Kevin O'Connor
2016-04-01 14:58 ` Kevin O'Connor
2016-04-01 15:06 ` Richard W.M. Jones
2016-04-01 15:14 ` Kevin O'Connor
2016-04-01 8:19 ` Richard W.M. Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160401204605.GR32728@redhat.com \
--to=rjones@redhat.com \
--cc=kevin@koconnor.net \
--cc=kraxel@redhat.com \
--cc=marc.mari.barcelo@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).