From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFfpa-0002ne-7M for qemu-devel@nongnu.org; Mon, 26 Jan 2015 04:19:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFfpZ-0003ou-Af for qemu-devel@nongnu.org; Mon, 26 Jan 2015 04:19:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFfpZ-0003oi-2h for qemu-devel@nongnu.org; Mon, 26 Jan 2015 04:19:37 -0500 Message-ID: <54C6069F.3010304@redhat.com> Date: Mon, 26 Jan 2015 10:19:27 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1421938053-10318-1-git-send-email-pbonzini@redhat.com> <1421938053-10318-8-git-send-email-pbonzini@redhat.com> <20150126062448.GG2354@ad.nay.redhat.com> In-Reply-To: <20150126062448.GG2354@ad.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/15] memory: avoid ref/unref in memory_region_find 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 26/01/2015 07:24, Fam Zheng wrote: >> > Do the entire lookup under RCU, which avoids atomic operations. > address_space_get_flatview() already is RCU protected, I don't see why this > patch is necessary. Could you explain? It's just an optimization; flatview_ref/flatview_unref do atomic_inc/atomic_dec and this patch avoids that. Paolo