From: Gleb Natapov <gleb@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Alexander Graf <agraf@suse.de>, Avi Kivity <avi@redhat.com>,
"Richard W.M. Jones" <rjones@redhat.com>
Subject: Re: [Qemu-devel] Slow kernel/initrd loading via fw_cfg; Was Re: Hack integrating SeaBios / LinuxBoot option rom with QEMU trace backends
Date: Tue, 11 Oct 2011 15:22:11 +0200 [thread overview]
Message-ID: <20111011132211.GZ30105@redhat.com> (raw)
In-Reply-To: <4E9441E8.5050301@codemonkey.ws>
On Tue, Oct 11, 2011 at 08:17:28AM -0500, Anthony Liguori wrote:
> On 10/11/2011 04:55 AM, Avi Kivity wrote:
> >On 10/11/2011 11:50 AM, Gleb Natapov wrote:
> >>On Tue, Oct 11, 2011 at 11:26:14AM +0200, Avi Kivity wrote:
> >>> rep/ins is exactly like dma+wait for this use case: provide an
> >>> address, get a memory image in return. There's no need to add
> >>> another interface, we should just optimize the existing one.
> >>>
> >>rep/ins cannot be optimized to be as efficient as dma and remain to
> >>be correct at the same time. There are various corner cases that
> >>simplified "fast" implementation will likely miss. Like DF flag
> >>settings, delaying interrupts for too much, doing ins/outs to/from
> >>iomem (this is may be not a big problem unless userspace finds a way
> >>to trigger it). There are ways that current implementation can be
> >>optimized still though.
> >
> >These can all go through the slow path, except interrupts, which need to be
> >checked after every access.
> >
> >>But loading MBs of data through fw_cfg interface is just abusing it.
> >>You wouldn't use pio on real HW to move megabytes of data and expect
> >>good performance.
> >
> >True, this is a point in favour of a true dma interface.
>
> Doing kernel loading through fw_cfg has always been a bit ugly.
>
> A better approach would be to implement a PCI device with a ROM bar
> that contained an option ROM that read additional bars from the
> device to get at the kernel and initrd.
I thought about this too. But sizes of initrd people mentioning here
a crazy. We can run out of pci space very quickly. We can implement one
of the BARs as sliding window into initrd though.
>
> That also enables some potentially interesting models like having
> the additional bars be optionally persisted letting a user have
> direct control over which kernel/initrds were loaded. It's
> essentially a PCI device with a flash chip on it that contains a
> kernel/initrd.
>
--
Gleb.
next prev parent reply other threads:[~2011-10-11 13:22 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 17:08 [Qemu-devel] Hack integrating SeaBios / LinuxBoot option rom with QEMU trace backends Daniel P. Berrange
2011-10-10 18:53 ` Anthony Liguori
2011-10-10 19:01 ` Alexander Graf
2011-10-11 8:23 ` [Qemu-devel] Slow kernel/initrd loading via fw_cfg; Was " Daniel P. Berrange
2011-10-11 8:43 ` Richard W.M. Jones
2011-10-11 9:15 ` Avi Kivity
2011-10-11 9:19 ` Alexander Graf
2011-10-11 9:26 ` Avi Kivity
2011-10-11 9:38 ` Alexander Graf
2011-10-11 9:49 ` Avi Kivity
2011-10-11 9:56 ` Gleb Natapov
2011-10-11 9:59 ` Avi Kivity
2011-10-11 10:28 ` Gleb Natapov
2011-10-11 13:12 ` Anthony Liguori
2011-10-11 13:14 ` Alexander Graf
2011-10-11 13:17 ` Gleb Natapov
2011-10-11 13:19 ` Anthony Liguori
2011-10-11 13:23 ` Avi Kivity
2011-10-11 13:24 ` Gleb Natapov
2011-10-11 13:29 ` Anthony Liguori
2011-10-11 13:45 ` Avi Kivity
2011-10-11 13:58 ` Anthony Liguori
2011-10-11 14:01 ` Daniel P. Berrange
2011-10-11 14:33 ` Anthony Liguori
2011-10-11 14:34 ` Alexander Graf
2011-10-11 14:36 ` Daniel P. Berrange
2011-10-11 9:50 ` Gleb Natapov
2011-10-11 9:55 ` Avi Kivity
2011-10-11 13:17 ` Anthony Liguori
2011-10-11 13:22 ` Gleb Natapov [this message]
2011-10-15 14:19 ` Kevin O'Connor
2011-10-11 9:27 ` Daniel P. Berrange
2011-10-11 9:39 ` Avi Kivity
2011-10-11 9:49 ` Daniel P. Berrange
2011-10-11 9:50 ` Avi Kivity
2011-10-11 10:09 ` Daniel P. Berrange
2011-10-15 10:00 ` Blue Swirl
2011-10-15 16:16 ` Richard W.M. Jones
2011-10-16 17:20 ` Lluís Vilanova
2011-10-11 9:08 ` [Qemu-devel] " Avi Kivity
2011-10-11 9:18 ` Daniel P. Berrange
2011-10-11 9:35 ` Avi Kivity
2011-10-10 23:57 ` 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=20111011132211.GZ30105@redhat.com \
--to=gleb@redhat.com \
--cc=agraf@suse.de \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--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 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).