From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1am5KL-0008U3-2e for qemu-devel@nongnu.org; Fri, 01 Apr 2016 16:05:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1am5KH-0001zg-2H for qemu-devel@nongnu.org; Fri, 01 Apr 2016 16:05:53 -0400 Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]:35992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1am5KG-0001za-T1 for qemu-devel@nongnu.org; Fri, 01 Apr 2016 16:05:48 -0400 Received: by mail-qk0-x22d.google.com with SMTP id i4so42789023qkc.3 for ; Fri, 01 Apr 2016 13:05:48 -0700 (PDT) Date: Fri, 1 Apr 2016 16:05:46 -0400 From: Kevin O'Connor Message-ID: <20160401200546.GA19187@morn.lan> References: <56FE3045.2030003@redhat.com> <20160401084456.GF32728@redhat.com> <1459502310.7011.37.camel@redhat.com> <20160401101733.GI32728@redhat.com> <1459508875.7011.62.camel@redhat.com> <20160401111139.GK32728@redhat.com> <1459510371.7011.63.camel@redhat.com> <20160401114947.GM32728@redhat.com> <20160401153540.GD25490@morn.lan> <20160401184131.GP32728@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160401184131.GP32728@redhat.com> Subject: Re: [Qemu-devel] Why is SeaBIOS used with -kernel? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: marc.mari.barcelo@gmail.com, Paolo Bonzini , qemu-devel@nongnu.org, Gerd Hoffmann , Stefan Hajnoczi 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 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. Another consumer of time is ACPI table deployment. I wonder if you could get similar results by running QEMU with "-no-acpi"? 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, -Kevin