From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 2/4] KVM: move coalesced_mmio locking to its own device Date: Wed, 20 May 2009 17:29:23 +0300 Message-ID: <4A1413C3.4020606@redhat.com> References: <20090518165601.747763120@localhost.localdomain> <20090518170855.346048603@localhost.localdomain> <4A13F242.7090404@redhat.com> <20090520140956.GA3370@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:45451 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754348AbZETO3Y (ORCPT ); Wed, 20 May 2009 10:29:24 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4KETQ8Z001453 for ; Wed, 20 May 2009 10:29:26 -0400 In-Reply-To: <20090520140956.GA3370@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Marcelo Tosatti wrote: >> So we have a function that takes a lock and conditionally releases it? >> > > Yes, but it is correct: it will only return with the lock held in case > it returns 1, in which case its guaranteed ->write will be called (which > will unlock it). > > It should check the range first and/or use some smarter synchronization, > but one thing at a time. > Yes it's correct but we'll get an endless stream of patches to 'fix' it because it is so unorthodox. -- error compiling committee.c: too many arguments to function