From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uu1mc-0002Aa-Gm for qemu-devel@nongnu.org; Tue, 02 Jul 2013 10:42:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uu1ma-0008MJ-IP for qemu-devel@nongnu.org; Tue, 02 Jul 2013 10:42:18 -0400 Received: from david.siemens.de ([192.35.17.14]:33730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uu1ma-0008MB-67 for qemu-devel@nongnu.org; Tue, 02 Jul 2013 10:42:16 -0400 Message-ID: <51D2E6C4.2080400@siemens.com> Date: Tue, 02 Jul 2013 16:42:12 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1372444009-11544-1-git-send-email-pbonzini@redhat.com> <1372444009-11544-26-git-send-email-pbonzini@redhat.com> In-Reply-To: <1372444009-11544-26-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 25/30] exec: put memory map in AddressSpaceDispatch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On 2013-06-28 20:26, Paolo Bonzini wrote: > This lets us get a consistent (phys_map, nodes, sections) using > RCU. After this patch, cur_map is not used anymore except for freeing > it at the end of the topology update. > > Signed-off-by: Paolo Bonzini > --- > exec.c | 28 +++++++++++++++++----------- > 1 file changed, 17 insertions(+), 11 deletions(-) > > diff --git a/exec.c b/exec.c > index 0d852ee..581f0c4 100644 > --- a/exec.c > +++ b/exec.c > @@ -94,11 +94,15 @@ struct PhysPageEntry { > uint16_t ptr : 15; > }; > > +typedef PhysPageEntry Node[L2_SIZE]; > + > struct AddressSpaceDispatch { > /* This is a multi-level map on the physical address space. > * The bottom level has pointers to MemoryRegionSections. > */ > PhysPageEntry phys_map; > + Node *nodes; > + MemoryRegionSection *sections; Why not sticking the whole current PhysPageMap into here? Wouldn't that also allow to overcome prev_map completely (next patch)? Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux