* [Qemu-devel] vexpress: Horribly slow MMC emulation on ARM host
@ 2015-02-16 6:56 Jan Kiszka
2015-02-16 9:11 ` Peter Maydell
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2015-02-16 6:56 UTC (permalink / raw)
To: qemu-devel; +Cc: kvmarm, kvm
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
Hi,
this basically concludes my problems of getting KVM running on the
Jetson TK1 board with QEMU: all fine now, provided I switch from
qemu-system-arm -machine vexpress-a15 -sd disk.img ...
to
qemu-system-arm -machine vexpress-a15 \
-drive file=disk.img,if=none,id=disk \
-device virtio-blk-device,drive=disk ...
This applies to both emulated and KVM accelerated mode. If I run the
same image (and guest kernel) emulated on my x86 box, there is still a
difference between both disk modes, but it's not that excessive. On ARM
the system requires minutes to boot from MMC - if it doesn't run into
timeouts earlier. It's seconds with virtio.
Known problem?
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] vexpress: Horribly slow MMC emulation on ARM host
2015-02-16 6:56 [Qemu-devel] vexpress: Horribly slow MMC emulation on ARM host Jan Kiszka
@ 2015-02-16 9:11 ` Peter Maydell
0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2015-02-16 9:11 UTC (permalink / raw)
To: Jan Kiszka; +Cc: qemu-devel, kvm, kvmarm
On 16 February 2015 at 06:56, Jan Kiszka <jan.kiszka@web.de> wrote:
> This applies to both emulated and KVM accelerated mode. If I run the
> same image (and guest kernel) emulated on my x86 box, there is still a
> difference between both disk modes, but it's not that excessive. On ARM
> the system requires minutes to boot from MMC - if it doesn't run into
> timeouts earlier. It's seconds with virtio.
MMC is slow for several reasons, which boil down to:
* we aren't doing async I/O on the block device layer
(the SD/MMC card code is old and probably a long way from
current best practice)
* we model the mmc-controller-to-card interface fairly closely,
which is not a very efficient way of transferring data
* the MMC card interface in the vexpress board doesn't do DMA,
which means that all data transferred is via (at best) word
at a time MMIO register accesses
* MMIO register access is particularly bad with KVM because it
requires us to come out of EL1 guest to EL2 which then switches
to EL1 host (host kernel) which then drops out to EL0 (QEMU),
and then on return we do the reverse transition EL0->EL1->EL2->EL1.
Some of this is likely fixable (and possibly there are bugs
which make it slower than it need be as well as the issues
we actually know about). But in general we've taken the
approach of saying "if you want sensible IO performance use
virtio", because some of the above list (no DMA, for instance)
is unavoidable.
-- PMM
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-16 9:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-16 6:56 [Qemu-devel] vexpress: Horribly slow MMC emulation on ARM host Jan Kiszka
2015-02-16 9:11 ` Peter Maydell
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).