All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: "Richard W.M.Jones" <rjones@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Question about qemu firmware configuration (fw_cfg) device
Date: Mon, 19 Jul 2010 09:23:56 +0300	[thread overview]
Message-ID: <20100719062356.GU4689@redhat.com> (raw)
In-Reply-To: <44FD4F00-843D-41C8-B21A-148D16745015@suse.de>

On Sun, Jul 18, 2010 at 10:32:53PM +0200, Alexander Graf wrote:
> 
> On 18.07.2010, at 22:09, Richard W.M. Jones wrote:
> 
> > On Sun, Jul 18, 2010 at 07:26:57PM +0200, Alexander Graf wrote:
> >> On 17.07.2010, at 11:53, Richard W.M. Jones wrote:
> >>> On Sat, Jul 17, 2010 at 10:50:59AM +0100, Richard W.M. Jones wrote:
> >>>> I understand from the git logs that fw_cfg was added because the old
> >>>> way was to load kernel & initrd into RAM directly, but this didn't
> >>>> work because SeaBIOS would clear the RAM, clobbering kernel & initrd.
> >>>> Could we change to loading these directly into RAM, and instead
> >>>> provide some indication to SeaBIOS so it doesn't clobber the RAM?  I'm
> >>>> quite prepared to do the work, just wondering if there's something
> >>>> else I'm not getting about this.
> >>> 
> >>> Or thinking around the subject:
> >>> 
> >>> Change fw_cfg so that you send a command + a physical address, and
> >>> fw_cfg memcpy's the kernel / initrd / etc to that physical address.
> >>> Then linuxboot.bin doesn't have to do the manual copying.
> >>> 
> >>> Or just change linuxboot.bin so it does 32 bit inl instructions, which
> >>> might at least be a bit faster ...
> >> 
> >> I don't see why it would be slow. ins should be emulated using coalesced mmio, no?
> > 
> > It knocks 1 second off libguestfs boot times on my faster 64 bit
> > desktop machine, and 2 seconds off with my old 32 bit laptop.
> > (Roughly 15% faster in both cases)
> > 
> > The 64 bit machine times are:
> > 
> > Without my patch:
> > 
> > real	0m7.581s
> > user	0m4.730s
> > sys	0m2.124s
> > 
> > With my patch:
> > 
> > real	0m6.579s
> > user	0m3.614s
> > sys	0m1.941s
> > 
> > If you want to reproduce this (you'll need a recent Fedora machine)
> > you can do:
> > 
> >  $ cat qemu-wrapper 
> >  #!/bin/sh -
> >  qemudir=/home/rjones/d/qemu
> >  exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "$@"
> > 
> >  $ export LIBGUESTFS_QEMU=/home/rjones/d/qemu/qemu-wrapper
> >  $ time guestfish --ro -a /dev/null run
> > 
> > Obviously I'm running that several times over, discarding the first
> > few runs, because I'm only interested in the "hot cache" case.
> > 
> > By the way, even if you reject the patch as a whole, part 1/2 of the
> > patch is just an obvious bug fix, and I think should be applied
> > anyway.
> > 
> > http://lists.gnu.org/archive/html/qemu-devel/2010-07/threads.html#00967
> 
> I haven't rejected anything yet - in general I like the idea of DMA'ing fw_cfg variables. I guess since it's basically an ISA PV device, we also don't need to care about bus mastering or anything, right? Or do we? Hrm.
> 
That what I am warring about too. If we are adding device we have to be
sure such device can actually exist on real hw too otherwise we may have
problems later. Also 1 second on 100M file does not look like huge gain
to me.

--
			Gleb.

  reply	other threads:[~2010-07-19  6:24 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-17  9:50 [Qemu-devel] Question about qemu firmware configuration (fw_cfg) device Richard W.M. Jones
2010-07-17  9:53 ` Richard W.M. Jones
2010-07-18 17:26   ` Alexander Graf
2010-07-18 20:09     ` Richard W.M. Jones
2010-07-18 20:32       ` Alexander Graf
2010-07-19  6:23         ` Gleb Natapov [this message]
2010-07-19  7:28           ` Richard W.M. Jones
2010-07-19  7:33             ` Gleb Natapov
2010-07-19  7:40               ` Alexander Graf
2010-07-19  7:51                 ` Gleb Natapov
2010-07-19  7:57                   ` Alexander Graf
2010-07-19  8:01                     ` Gleb Natapov
2010-07-19  8:08                       ` Alexander Graf
2010-07-19  8:19                         ` Gleb Natapov
2010-07-19  8:24                           ` Alexander Graf
2010-07-19  8:30                             ` Gleb Natapov
2010-07-19  8:41                               ` Alexander Graf
2010-07-19  8:48                                 ` Gleb Natapov
2010-07-19  8:54                                   ` Alexander Graf
2010-07-19  9:00                                     ` Gleb Natapov
2010-07-19  9:02                                       ` Alexander Graf
2010-07-19  9:10                                         ` Gleb Natapov
2010-07-19  9:13                                           ` Alexander Graf
2010-07-19  9:19                                             ` Gleb Natapov
2010-07-19  9:21                                               ` Alexander Graf
2010-07-19  9:32                                                 ` Gleb Natapov
2010-07-19  9:23                                               ` Richard W.M. Jones
2010-07-20 13:15                   ` Jamie Lokier
2010-07-20 13:40                     ` Gleb Natapov
2010-07-20 13:59                       ` Richard W.M. Jones
2010-07-19  9:19                 ` Richard W.M. Jones
2010-07-19  7:44               ` Richard W.M. Jones
2010-07-19  7:55                 ` Gleb Natapov
2010-07-19  8:34                   ` Richard W.M. Jones
2010-07-19  8:40                     ` Gleb Natapov
2010-07-19  9:00                       ` Richard W.M. Jones
2010-07-19  9:04                         ` Richard W.M. Jones
2010-07-19  9:06                         ` Gleb Natapov
2010-07-19  9:09                           ` Alexander Graf
2010-07-19  9:15                             ` Gleb Natapov
2010-07-19  9:16                               ` Alexander Graf
2010-07-19 13:06                               ` Richard W.M. Jones
2010-07-19 13:12                                 ` Gleb Natapov
2010-07-19 14:52                               ` Anthony Liguori
2010-07-19 14:54                                 ` Gleb Natapov
2010-07-19 14:45               ` Anthony Liguori
2010-07-19 14:53                 ` Gleb Natapov
2010-07-19 15:54                   ` Anthony Liguori
2010-07-19 16:11                     ` Gleb Natapov
2010-07-19 16:47                       ` Richard W.M. Jones
2010-07-19 17:04                         ` Gleb Natapov
2010-07-19 19:06                       ` Anthony Liguori
2010-07-19  6:12     ` Gleb Natapov
2010-07-19  6:14 ` [Qemu-devel] " Gleb Natapov
2010-07-20 22:22 ` [Qemu-devel] " Blue Swirl
2010-07-21  7:27   ` Alexander Graf

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=20100719062356.GU4689@redhat.com \
    --to=gleb@redhat.com \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.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.