From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMPO-0008HE-Ir for qemu-devel@nongnu.org; Mon, 06 May 2013 10:28:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZMPN-0006Wz-6l for qemu-devel@nongnu.org; Mon, 06 May 2013 10:28:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZMPM-0006Vn-Uh for qemu-devel@nongnu.org; Mon, 06 May 2013 10:28:53 -0400 Message-ID: <5187BE1B.4070706@redhat.com> Date: Mon, 06 May 2013 16:28:43 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1353808984-22368-1-git-send-email-qemulist@gmail.com> <51829B30.7020308@siemens.com> <51836FA8.2000501@siemens.com> <5184D942.5020506@redhat.com> <5184E601.9030407@web.de> <518764CD.2080602@redhat.com> <51876C86.5040301@siemens.com> <5187859C.5020305@redhat.com> <51878C4B.7050700@siemens.com> <51878CF0.1080009@redhat.com> <51878FCE.2020907@siemens.com> <518793F7.1010502@redhat.com> <51879674.70706@siemens.com> <51879844.1030101@redhat.com> <51879CDA.3000800@siemens.com> <5187AB80.3040906@redhat.com> <5187B8C4.3010207@siemens.com> In-Reply-To: <5187B8C4.3010207@siemens.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: qemu-devel , Liu Ping Fan Il 06/05/2013 16:05, Jan Kiszka ha scritto: >> Also, memory_region_find cannot know if it's returning a valid result, >> and the callee cannot check it because the region may have disappeared >> already when it is returned. > > Again, we hold the address space lock while checking the conditions. If > a region does not supports BQL-free mode and BQL is not held, we have an > error and return NULL (or bail out with a runtime error). I've now posted my patches (which are really complementary to Ping Fan's), and there's no address space lock. (here is a lock, but the critical section is literally a handful of instructions and everything is done with reference counting. Paolo