From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] MMIO: Make coalesced mmio use a device per zone Date: Tue, 19 Jul 2011 11:48:51 +0300 Message-ID: <4E2544F3.9030203@redhat.com> References: <1311063011-4430-1-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Marcelo Tosatti To: Sasha Levin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:9822 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752486Ab1GSIs4 (ORCPT ); Tue, 19 Jul 2011 04:48:56 -0400 In-Reply-To: <1311063011-4430-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/19/2011 11:10 AM, Sasha Levin wrote: > This patch changes coalesced mmio to create one mmio device per > zone instead of handling all zones in one device. > > Doing so enables us to take advantage of existing locking and prevents > a race condition between coalesced mmio registration/unregistration > and lookups. > > > > #include "coalesced_mmio.h" > > +static spinlock_t lock; > +static LIST_HEAD(head); Make these per-guest instead of global. The lock may be contended, and the list shouldn't hold items from different guests (why is it needed, anyway?) The coalesced mmio devices will now contend with other io devices for NR_IOBUS_DEVS, so need to increase that (by KVM_COALESCED_MMIO_ZONE_MAX). -- error compiling committee.c: too many arguments to function