From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] Re: QEMU-KVM and video performance Date: Wed, 21 Apr 2010 23:56:57 +0300 Message-ID: <4BCF6699.2060201@redhat.com> References: <4BCEBE5C.4020404@redhat.com> <20100421183357.GK27575@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jamie Lokier , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Gerhard Wiesinger Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62316 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756547Ab0DUU5E (ORCPT ); Wed, 21 Apr 2010 16:57:04 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 04/21/2010 09:50 PM, Gerhard Wiesinger wrote: >>> 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. That indicates a fault every write (assuming 8-16 bit writes). If you're using 256 color vga and not switching banks, this indicates a bug. > 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. That's suprisingly fast. I'd expect 100-200k/sec. Please run kvm_stat and report output for both tests to confirm. > > To get real good VGA performance both parameters should be: > About >50MB/s for writes to segment A000 > ~500.000 bank switches per second. First should be doable easily, second is borderline. > 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? No. Code can run in either qemu or kvm, not both. You can switch between them based on access statistics (early versions of qemu-kvm did that, without the statistics part), but this isn't trivial. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.