From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZEkR-0002VP-Dj for qemu-devel@nongnu.org; Mon, 06 May 2013 02:18:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZEkQ-0000aJ-2Z for qemu-devel@nongnu.org; Mon, 06 May 2013 02:18:07 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:54911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZEkP-0000aD-R4 for qemu-devel@nongnu.org; Mon, 06 May 2013 02:18:05 -0400 Received: by mail-ee0-f46.google.com with SMTP id b57so1542885eek.19 for ; Sun, 05 May 2013 23:18:04 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51874B13.1080304@redhat.com> Date: Mon, 06 May 2013 08:17:55 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1367549122-2948-1-git-send-email-qemulist@gmail.com> <5184DA9A.7050901@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/6] proposal to make hostmem listener RAM unplug safe List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: Peter Maydell , Anthony Liguori , Jan Kiszka , qemu-devel@nongnu.org, Vasilis Liaskovitis , Stefan Hajnoczi Il 06/05/2013 03:42, liu ping fan ha scritto: > On Sat, May 4, 2013 at 5:53 PM, Paolo Bonzini wrote: >> Il 03/05/2013 04:45, Liu Ping Fan ha scritto: >>> v1->v2: >>> 1.split RCU prepared style update and monitor the RAM-Device refcnt into two patches (patch 2,4) >>> 2.introduce AddrSpaceMem, which is similar to HostMem, but based on address space, while >>> the original HostMem only server system memory address space >> >> This looks suspiciously similar to FlatView, doesn't it? >> > FlatView is used for all the listeners, including for mmio dispatching, > which aims to mapping from hwaddr to DeviceState for dispatching service. > While here, we mapping from hwaddr to hva. > >> Perhaps the right thing to do is to add the appropriate locking and >> RCU-style updating to address_space_update_topology and > > RCU implementation is data struct related, and each listener has its > local table, so I think it is more reasonable to implement them > separately. I mentioned address_space_update_topology simply because it is where the FlatView is replaced. >> memory_region_find. (And replacing flatview_destroy with ref/unref >> similar to HostMem in your patch 2). Then just switch dataplane to use >> memory_region_find... >> > In fact, I think, HostMem listener can be an substitute for > cpu_physical_memory_map(), the main issue can be the migration > support. But before getting big patches, I hope to have this smaller > and simpler one. I think replacing HostMem with FlatView is a smaller patch than these ones. I'll try to make a prototype. Paolo