From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4eOB-0000Lp-WD for qemu-devel@nongnu.org; Wed, 21 Apr 2010 14:11:08 -0400 Received: from [140.186.70.92] (port=53582 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4eO9-0000Kt-HH for qemu-devel@nongnu.org; Wed, 21 Apr 2010 14:11:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4eO8-0005ZO-GJ for qemu-devel@nongnu.org; Wed, 21 Apr 2010 14:11:05 -0400 Received: from chello084112167138.7.11.vie.surfer.at ([84.112.167.138]:42769 helo=wiesinger.com) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4eO8-0005IY-1X for qemu-devel@nongnu.org; Wed, 21 Apr 2010 14:11:04 -0400 Date: Wed, 21 Apr 2010 20:09:29 +0200 (CEST) From: Gerhard Wiesinger Subject: Re: [Qemu-devel] Re: QEMU-KVM and video performance In-Reply-To: <4BCEBE5C.4020404@redhat.com> Message-ID: References: <4BCEBE5C.4020404@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On Wed, 21 Apr 2010, Avi Kivity wrote: > On 04/19/2010 10:14 PM, Gerhard Wiesinger wrote: >> Hello, >> >> Finally I got QEMU-KVM to work but video performance under DOS is very low >> (QEMU 0.12.3 stable and QEMU GIT master branch is fast, QEMU KVM is slow) >> >> I'm measuring 2 performance critical video performance parameters: >> 1.) INT 10h, function AX=4F05h (set same window/set window/get window) >> 2.) Memory performance to segment page A000h >> >> So BIOS performance (which might be port performance to VGA index/value >> port) is about factor 5 slower, memory performance is about factor 100 >> slower. >> >> QEMU 0.12.3 and QEMU GIT performance is the same (in the measurement >> tolerance) and listed only once, QEMU KVM is much more slower (details see >> below). >> >> Test programs can be provided, source code will be release soon. >> >> Any ideas why KVM is so slow? > > 16-color vga is slow because kvm cannot map the framebuffer to the guest > (writes are not interpreted as RAM writes). 256+-color vga should be fast, > except when switching the vga window. Note it's only fast on average, the > first write into a page will be slow as kvm maps it in. > > Which mode are you using? > 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. 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)? Thnx. Ciao, Gerhard -- http://www.wiesinger.com/