From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIaO3-0002s8-2q for qemu-devel@nongnu.org; Tue, 03 Feb 2015 05:07:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIaNy-0001GF-Vp for qemu-devel@nongnu.org; Tue, 03 Feb 2015 05:07:15 -0500 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]:64328) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIaNy-0001G0-Og for qemu-devel@nongnu.org; Tue, 03 Feb 2015 05:07:10 -0500 Received: by mail-we0-f177.google.com with SMTP id l61so43915613wev.8 for ; Tue, 03 Feb 2015 02:07:10 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54D09DCA.4000006@redhat.com> Date: Tue, 03 Feb 2015 11:07:06 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1421938053-10318-1-git-send-email-pbonzini@redhat.com> <1421938053-10318-11-git-send-email-pbonzini@redhat.com> <20150128054515.GA10117@ad.nay.redhat.com> In-Reply-To: <20150128054515.GA10117@ad.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 10/15] exec: RCUify AddressSpaceDispatch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: borntraeger@de.ibm.com, qemu-devel@nongnu.org, stefanha@redhat.com On 28/01/2015 06:45, Fam Zheng wrote: > If I understand it, this code doesn't hold iothread lock when releasing the > memory region, but in one of the memroy region destructors, > memory_region_destructor_ram_from_ptr: > > void qemu_ram_free_from_ptr(ram_addr_t addr) > { > RAMBlock *block; > > /* This assumes the iothread lock is taken here too. */ > qemu_mutex_lock_ramlist(); > QTAILQ_FOREACH(block, &ram_list.blocks, next) { > ... > > Is the comment stale or I missed something? No, you're right. Paolo