qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] vga slow with -enable-kvm
@ 2008-11-07  9:18 Gerd Hoffmann
  2008-11-07 10:17 ` Glauber Costa
  2008-11-07 14:02 ` Anthony Liguori
  0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2008-11-07  9:18 UTC (permalink / raw)
  To: qemu-devel

  Hi,

The vga display is very slow when using latest svn with kvm enabled.
Just try to boot any linux kernel with vesafb enabled (vga=0x314 for
800x600@16), enjoy watching the boot messages scroll.  Booting without
kvm enabled is *faster*.

Feels like every single screen access is trapped or something like that.
kvm_stat confirms that, there are tons of mmio exits:

[root@zweiblum ~]# kvm_stat -1
efer_reload                    0         0
exits                   98234706    132054
fpu_reload               6330433         0
halt_exits                104372         0
halt_wakeup                    0         0
host_state_reload       96499874    132038
hypercalls                     0         0
insn_emulation          94632076    129954
insn_emulation_fail            0         0
invlpg                         0         0
io_exits                 2627489      1653
irq_exits                 239675       397
irq_window                 11138        14
largepages                     0         0
mmio_exits              93583132    129946
mmu_cache_miss             38079         0
mmu_flooded                37708         0
mmu_pde_zapped             35810         0
mmu_pte_updated           588299         0
mmu_pte_write             647324         0
mmu_recycled                   0         0
mmu_shadow_zapped          48191         0
pf_fixed                 1211070         1
pf_guest                  109462         0
remote_tlb_flush               0         0
request_irq                    0         0
signal_exits              164181       402
tlb_flush                 728218        44

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] vga slow with -enable-kvm
  2008-11-07  9:18 [Qemu-devel] vga slow with -enable-kvm Gerd Hoffmann
@ 2008-11-07 10:17 ` Glauber Costa
  2008-11-07 14:02 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Glauber Costa @ 2008-11-07 10:17 UTC (permalink / raw)
  To: qemu-devel

On Fri, Nov 7, 2008 at 7:18 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
>  Hi,
>
> The vga display is very slow when using latest svn with kvm enabled.
> Just try to boot any linux kernel with vesafb enabled (vga=0x314 for
> 800x600@16), enjoy watching the boot messages scroll.  Booting without
> kvm enabled is *faster*.
>
> Feels like every single screen access is trapped or something like that.
> kvm_stat confirms that, there are tons of mmio exits:

The vga optimization is supposed to fix this. I noticed this too, and
maybe there's something
wrong per se. But since the result with the optimization was pretty
decent, I honestly didn't cared.

>
> [root@zweiblum ~]# kvm_stat -1
> efer_reload                    0         0
> exits                   98234706    132054
> fpu_reload               6330433         0
> halt_exits                104372         0
> halt_wakeup                    0         0
> host_state_reload       96499874    132038
> hypercalls                     0         0
> insn_emulation          94632076    129954
> insn_emulation_fail            0         0
> invlpg                         0         0
> io_exits                 2627489      1653
> irq_exits                 239675       397
> irq_window                 11138        14
> largepages                     0         0
> mmio_exits              93583132    129946
> mmu_cache_miss             38079         0
> mmu_flooded                37708         0
> mmu_pde_zapped             35810         0
> mmu_pte_updated           588299         0
> mmu_pte_write             647324         0
> mmu_recycled                   0         0
> mmu_shadow_zapped          48191         0
> pf_fixed                 1211070         1
> pf_guest                  109462         0
> remote_tlb_flush               0         0
> request_irq                    0         0
> signal_exits              164181       402
> tlb_flush                 728218        44
>
> cheers,
>  Gerd
>
>
>



-- 
Glauber  Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] vga slow with -enable-kvm
  2008-11-07  9:18 [Qemu-devel] vga slow with -enable-kvm Gerd Hoffmann
  2008-11-07 10:17 ` Glauber Costa
@ 2008-11-07 14:02 ` Anthony Liguori
  1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2008-11-07 14:02 UTC (permalink / raw)
  To: qemu-devel

Gerd Hoffmann wrote:
>   Hi,
>
> The vga display is very slow when using latest svn with kvm enabled.
> Just try to boot any linux kernel with vesafb enabled (vga=0x314 for
> 800x600@16), enjoy watching the boot messages scroll.  Booting without
> kvm enabled is *faster*.
>   

Yeah, this is why we need the VGA optimization.  A tight MMIO loop in 
QEMU is actually pretty efficient.  No code translation is needed so it 
ends up being a pretty straight forward set of calls to the MMIO handler 
function.

It's hugely expensive in KVM though because you have to take a huge 
number of vmexits and they're pretty expensive.  Anyway, the VGA 
optimization will fix this nicely.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-07 14:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-07  9:18 [Qemu-devel] vga slow with -enable-kvm Gerd Hoffmann
2008-11-07 10:17 ` Glauber Costa
2008-11-07 14:02 ` Anthony Liguori

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).