From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA4JE-0006sE-6Q for qemu-devel@nongnu.org; Thu, 06 May 2010 12:52:24 -0400 Received: from [140.186.70.92] (port=50992 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA4JB-0006pT-9i for qemu-devel@nongnu.org; Thu, 06 May 2010 12:52:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA4J9-0003aa-Bk for qemu-devel@nongnu.org; Thu, 06 May 2010 12:52:20 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:60505) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA4J9-0003aD-8Y for qemu-devel@nongnu.org; Thu, 06 May 2010 12:52:19 -0400 Received: by vws17 with SMTP id 17so154742vws.4 for ; Thu, 06 May 2010 09:52:17 -0700 (PDT) MIME-Version: 1.0 Sender: camm@ualberta.ca In-Reply-To: References: Date: Thu, 6 May 2010 10:52:16 -0600 Message-ID: Subject: Re: [Qemu-devel] Re: How to map PCI memory into the VM without trapping From: Cam Macdonell Content-Type: text/plain; charset=ISO-8859-1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Frank Berreth Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On Wed, May 5, 2010 at 5:20 PM, Frank Berreth wrote: > Hi there, > this is just an update if you are interested in the outcome. I turns out > that my initial assumption that there would be page faults/trapping on the > memory pages was false. The reason the throughput is so low is because the > memory was mapped non-cached. The VGA driver and the ivshmem driver use > pci_ioremap_bar which will *always* map the PCI bar non-cached (even the > resourceX_wc). > Changing the driver(s) to use ioremap_cache or ioremap_wc speeds up things > quite a bit. I don't know if VGA framebuffer was always mapped this way -- > it appears on a real system that usually graphics memory is mapped WC. > Mapping it UC would cause quite a performance degradation. This could be the > reason for the reported VGA performance drop in another email thread. IMHO, > since QEMU emulates VGA, this could be mapped WB. > Thanks, > Frank. > Hi Frank, Thanks for the note. I'll make the change to cached and see if that helps with some of the tests I'm running. Cheers, Cam