public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gerhard Wiesinger <lists@wiesinger.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Avi Kivity <avi@redhat.com>, qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] Re: QEMU-KVM and video performance
Date: Wed, 21 Apr 2010 20:50:28 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1004212039460.20263@bbs.intern> (raw)
In-Reply-To: <20100421183357.GK27575@shareable.org>

On Wed, 21 Apr 2010, Jamie Lokier wrote:

> Gerhard Wiesinger wrote:
>> I'm using VESA mode 0x101 (640x480 256 colors), but performance is
>> there very low (~1MB/s). Test is also WITHOUT any vga window change, so
>> there isn't any page switching overhead involved in this test case.
>>
>>>> Any ideas for improvement?
>>>
>>> Currently when the physical memory map changes (which is what happens
>>> when the vga window is updated), kvm drops the entire shadow cache.  It's
>>> possible to do this only for vga memory, but not easy.
>>
>> I don't think changing VGA window is a problem because there are
>> 500.000-1Mio changes/s possible.
>
> 1MB/s, 500k-1M changes/s.... Coincidence?  Is it taking a page fault
> or trap on every write?

To clarify:
Memory Performance writing to segmen A000 is about 1MB/st.
Calling INT 10 set/get window function with different windows (e.g. 
toggling between window page 0 and 1) is about 500.000 to 1Mio function 
calls per second.

To get real good VGA performance both parameters should be:
About >50MB/s for writes to segment A000
~500.000 bank switches per second.

>> Would it be possible to handle these writes through QEMU directly (without
>> KVM), because performance is there very well (looking at the code there
>> is some pointer arithmetic and some memory write done)?
>
> I've noticed extremely slow VGA performance too, when installing OSes.
> It makes the difference between installing in a few minutes, and
> installing taking hours - just because of the slow VGA.
>
> So generally I use qemu for installing old versions of Windows, then
> change to KVM to run them after installing.
>
> Switching between KVM and qemu automatically based on guest code
> behaviour, and making both memory models and device models compatible
> at run time, is a difficult thing.  I guess it's not worth the
> difficulty just to speed up VGA.

I think this is very easy to distingish:
1.) VGA Segment A000 is legacy and should be handled through QEMU 
and not through KVM (because it is much more faster). Also 16 color modes 
should be fast enough there.
2.) All other flat PCI memory accesses should be handled through KVM 
(there is a specialized driver loaded for that PCI device in the non legacy OS).

Is that easily possible?

Thnx.

Ciao,
Gerhard

  reply	other threads:[~2010-04-21 18:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19 19:14 QEMU-KVM and video performance Gerhard Wiesinger
2010-04-21  8:59 ` Avi Kivity
2010-04-21 10:08   ` [Qemu-devel] " Jamie Lokier
2010-04-21 10:49     ` Avi Kivity
2010-04-21 18:14       ` Gerhard Wiesinger
2010-04-21 20:49         ` [Qemu-devel] " Avi Kivity
2010-04-22  5:37           ` Gerhard Wiesinger
2010-04-22  6:57             ` Avi Kivity
2010-04-21 18:39       ` Jamie Lokier
2010-04-21 20:51         ` Avi Kivity
2010-04-21 21:19           ` Jamie Lokier
2010-04-22  5:44           ` Gerhard Wiesinger
2010-05-12 10:34             ` Jamie Lokier
2010-04-21 18:09   ` Gerhard Wiesinger
2010-04-21 18:33     ` Jamie Lokier
2010-04-21 18:50       ` Gerhard Wiesinger [this message]
2010-04-21 18:53         ` Jamie Lokier
2010-04-21 19:08           ` Gerhard Wiesinger
2010-04-21 21:30             ` Jamie Lokier
2010-04-22  6:12               ` Gerhard Wiesinger
2010-05-12 10:23                 ` Jamie Lokier
2010-04-21 20:56         ` Avi Kivity
2010-04-22  6:04           ` Gerhard Wiesinger
2010-04-22  7:03             ` Avi Kivity
2010-05-09 19:35               ` Gerhard Wiesinger
2010-05-10  7:32                 ` Avi Kivity
2010-05-12  6:14                   ` Gerhard Wiesinger
2010-05-12  6:39                     ` [Qemu-devel] " Avi Kivity
2011-02-18  7:32                       ` [Qemu-devel] Re: QEMU-KVM and video performance - Update Gerhard Wiesinger

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=alpine.LFD.2.00.1004212039460.20263@bbs.intern \
    --to=lists@wiesinger.com \
    --cc=avi@redhat.com \
    --cc=jamie@shareable.org \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /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