From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VExby-0001GS-4l for qemu-devel@nongnu.org; Thu, 29 Aug 2013 04:29:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VExbp-00078G-71 for qemu-devel@nongnu.org; Thu, 29 Aug 2013 04:29:50 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:52895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VExbo-00077d-Et for qemu-devel@nongnu.org; Thu, 29 Aug 2013 04:29:41 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Aug 2013 13:52:57 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 9E3E5E0058 for ; Thu, 29 Aug 2013 14:00:10 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7T8VC9E41156844 for ; Thu, 29 Aug 2013 14:01:12 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7T8TWFp001751 for ; Thu, 29 Aug 2013 13:59:32 +0530 Message-ID: <521F061C.5060405@linux.vnet.ibm.com> Date: Thu, 29 Aug 2013 16:28:13 +0800 From: Lei Li 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 , quintela@redhat.com, qemu-devel@nongnu.org, "Michael R. Hines" , Anthony Liguori , lagarcia@br.ibm.com, rcj@linux.vnet.ibm.com On 08/28/2013 02:37 PM, 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. I'll see if could find way to export RAMBlock as well. If not, will represent it like RDMA did. Replacing the block_offset argument of save_page with MemoryRegion might be a good idea, I will give it a try. Thanks for your suggestions! > > Paolo > -- Lei