All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Kevin OConnor <kevin@koconnor.net>,
	Samuel Ortiz <sameo@linux.intel.com>,
	seabios@seabios.org, Stefan Hajnoczi <stefanha@gmail.com>,
	Rob Bradford <robert.bradford@intel.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	stephend@silicom-usa.com, stefanb@linux.ibm.com
Subject: Re: [Qemu-devel] SeaBIOS booting time optimization
Date: Fri, 23 Nov 2018 12:18:13 +0100	[thread overview]
Message-ID: <CAGxU2F5-UUaJbwpKhTY1ZsRWVst=gM79nSjnZtZJVKDpime_Lw@mail.gmail.com> (raw)
In-Reply-To: <20181123062138.rdfaeaqq5uw43ey2@sirius.home.kraxel.org>

On Fri, Nov 23, 2018 at 7:21 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> On Thu, Nov 22, 2018 at 04:13:38PM +0100, Stefano Garzarella wrote:
> > On Thu, Nov 22, 2018 at 12:51 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
> > >
> > > On Thu, Nov 22, 2018 at 12:08:55PM +0100, Stefano Garzarella wrote:
> > > > Hi,
> > > > I continued to investigate how to reduce the boot time with SeaBIOS
> > > > and QEMU when it used with linuxboot_dma.bin (-kernel parameter).
> > > > I reached ~12ms with a SeaBIOS configuration (attached) where I
> > > > disabled debug output, all Hardware support (except SMM & MTRRs) and I
> > > > applied a small patch to disable VGA setup and console (attached).
> > >
> > > Is there any difference to "qemu -vga none" ?
> >
> > Using both (qemu -vga none, and my patch) we are around 10.8 ms.
> > Note: using only the patch, Linux is still able to initialize and use the VGA.
>
> But do you want linux use the vga console if you care about boot times?
> I'd expect virtio-console would be fastest in that case.

I agree with you, but if we will implement a QEMU fastboot feature in
SeaBIOS, we are sure that it works with Linux kernel if someone uses
"qemu -kernel" and wants also use a VGA.

>
> > - QEMU -vga none + SeaBIOS config (CONFIG_DEBUG_LEVEL=0, disable all
> > HW support except
> > SMM & MTRRs) + Stephen's TPM patch
> >  qemu_init_end: 43.675803
> >  fw_start: 43.865178 (+0.189375)
> >  fw_do_boot: 58.093161 (+14.227983)
> >  linux_start_boot: 59.490308 (+1.397147)
> >  linux_start_user: 556.782354 (+497.292046)
> >
> > - QEMU -vga none + SeaBIOS config (CONFIG_DEBUG_LEVEL=0, disable all
> > HW support except
> > SMM & MTRRs, CONFIG_DISABLE_VGA=y) + Stephen's TPM patch
> >  qemu_init_end: 42.387412
> >  fw_start: 42.579257 (+0.191845)
> >  fw_do_boot: 53.381517 (+10.802260)
> >  linux_start_boot: 54.848643 (+1.467126)
> >  linux_start_user: 498.517050 (+443.668407)
>
> Interesting that CONFIG_DISABLE_VGA=y makes a noticable difference even
> without vga hardware being preset.  And not only in seabios but also for
> the linux kernel.
>
> Do you know why?

In SeaBIOS I think the reasons are:
- vgarom_setup() scan all PCI devices to find a VGA
- enable_vga_console() invokes an int10 without check if there is a
VGA (maybe here we can add a check)

Cheers,
Stefano

--
Stefano Garzarella
Red Hat

  reply	other threads:[~2018-11-23 11:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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='CAGxU2F5-UUaJbwpKhTY1ZsRWVst=gM79nSjnZtZJVKDpime_Lw@mail.gmail.com' \
    --to=sgarzare@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=robert.bradford@intel.com \
    --cc=sameo@linux.intel.com \
    --cc=seabios@seabios.org \
    --cc=stefanb@linux.ibm.com \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    --cc=stephend@silicom-usa.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 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.