From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4Xyb-0002OR-83 for qemu-devel@nongnu.org; Thu, 23 Aug 2012 10:01:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4XyV-0007Da-CY for qemu-devel@nongnu.org; Thu, 23 Aug 2012 10:01:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4XyV-0007DH-2y for qemu-devel@nongnu.org; Thu, 23 Aug 2012 10:01:31 -0400 Date: Thu, 23 Aug 2012 11:01:12 -0300 From: Marcelo Tosatti Message-ID: <20120823140112.GA29605@amt.cnet> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v3 uq/master 0/6] kvm: Get coalesced MMIO flushing out of the hot-path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony Liguori , Liu Ping Fan , Avi Kivity , kvm , qemu-devel On Thu, Aug 23, 2012 at 01:02:28PM +0200, Jan Kiszka wrote: > This is just a repost, now targeting uq/master as agreed. No changes > compared to v2 except that "i82378: Remove bogus MMIO coalescing" was > dropped as it is already in QEMU upstream by now. > > Original description: > > We currently flush the coalesced MMIO buffer on every vmexit to > userspace. KVM only provides a single buffer per VM, so a central lock > is required to read from it. This is a contention point given a large > enough VCPU set. Moreover, we need to hold the BQL while replaying the > queued requests, probably for a long time until there is more fine > grained locking available. Good reasons to overcome the unconditional > flush. > > The series achieves this by flushing only on selected memory region > accesses, either generically via the memory access dispatcher or > directly on certain VGA PIO accesses that are not yet fully converted. > Another reason to flush are remappings or other relevant region state > changes. > > Jan Kiszka (6): > memory: Flush coalesced MMIO on selected region access > memory: Use transaction_begin/commit also for single-step operations > memory: Fold memory_region_update_topology into > memory_region_transaction_commit > memory: Flush coalesced MMIO on mapping and state changes > VGA: Flush coalesced MMIO on related MMIO/PIO accesses > kvm: Stop flushing coalesced MMIO on vmexit > > hw/cirrus_vga.c | 7 ++++ > hw/qxl.c | 1 + > hw/vga-isa-mm.c | 1 + > hw/vga.c | 5 +++ > hw/vmware_vga.c | 1 + > kvm-all.c | 2 - > memory.c | 104 ++++++++++++++++++++++++++++++++----------------------- > memory.h | 26 ++++++++++++++ > 8 files changed, 102 insertions(+), 45 deletions(-) > > -- > 1.7.3.4 Applied, thanks.