From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VF2rT-0005oH-7A for qemu-devel@nongnu.org; Thu, 29 Aug 2013 10:06:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VF2rK-0001dd-0I for qemu-devel@nongnu.org; Thu, 29 Aug 2013 10:06:11 -0400 Received: from e9.ny.us.ibm.com ([32.97.182.139]:59199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VF2rJ-0001dV-SH for qemu-devel@nongnu.org; Thu, 29 Aug 2013 10:06:01 -0400 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Aug 2013 10:06:00 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 3A63BC90041 for ; Thu, 29 Aug 2013 10:05:57 -0400 (EDT) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7TE5quF036474 for ; Thu, 29 Aug 2013 10:05:53 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r7TE5ggg028176 for ; Thu, 29 Aug 2013 11:05:43 -0300 Message-ID: <521F5520.1080002@linux.vnet.ibm.com> Date: Thu, 29 Aug 2013 10:05:20 -0400 From: "Michael R. Hines" MIME-Version: 1.0 References: <1377069536-12658-1-git-send-email-lilei@linux.vnet.ibm.com> <1377069536-12658-9-git-send-email-lilei@linux.vnet.ibm.com> <521677CD.70801@linux.vnet.ibm.com> <521712CD.2000106@linux.vnet.ibm.com> <521D6DC9.4060408@linux.vnet.ibm.com> <521D9AAC.3000306@redhat.com> In-Reply-To: <521D9AAC.3000306@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/18] migration-local: introduce qemu_fopen_local() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Andrea Arcangeli , Lei Li , quintela@redhat.com, qemu-devel@nongnu.org, Anthony Liguori , lagarcia@br.ibm.com, rcj@linux.vnet.ibm.com On 08/28/2013 02:37 AM, Paolo Bonzini wrote: > Il 28/08/2013 05:26, Lei Li ha scritto: >>>> RAMBlock structs are not visible outside of exec.c and arch_init.c, >>>> how did you do this? >>> Hi Michael, >>> >>> Good catch! >>> Actually this is the 'Known issue' that I listed in the cover >>> letter, and I planed to ask suggestions on this. >>> >>> Currently the implementation of override of the RDMA hook like >>> save_page for localhost migration needs to have knowledge of >>> MemoryRegion and RAMBlock, say, when saving ram page, need to know >>> which RAMBlock the given ram address save_page hook passed is >>> belong to, or which is the last ram block has been sent. But seems >>> that such structs can not be exported to the private code in >>> migration-local.c. >>> >>> My guess for now is that there might be two possible ways to handle this: >>> >>> 1) Choose another way around, like representation of a RAMBlock and >>> MemoryRegion from localhost migration perspective. This might need >>> more work to handle the descriptions. >>> >>> 2) It could be exported directly into private code like migration-local.c >>> through some ways that I don't know yet. I remembered that the >>> implementation of postcopy migration did this. >>> >>> So I'd like to post and ask for your suggestions to make sure it's the >>> right and best way to handle. >> Hi Paolo, >> >> Any suggestions on this? > Unlike the RAM constants and migration states, I think exporting > MemoryRegion (not sure about RAMBlock) is fine. In fact, replacing the > save_page hook's block_offset argument with a MemoryRegion would be a > nice cleanup. > > Paolo > Sounds like a good plan to me. Once the localhost patch is fully reviewed - I'll submit a similar patch to make use of the exported MemoryRegion. - Michael