From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: live migration question Date: Tue, 31 Jan 2012 14:17:38 +0000 Message-ID: References: <4F27F39F.2030904@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F27F39F.2030904@ts.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Juergen Gross Cc: "xen-devel@lists.xensource.com" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 31/01/2012 13:58, "Juergen Gross" wrote: >>> I still don't see why xc_restore is able to do the mapping while my daemon >>> is >>> not. And I can't find any difference between a domain creation due to >>> xm restore and a live migration. >> Memory pages are populated as they appear in the migration data stream. >> Perhaps you are trying to map a guest page that has simply not yet been >> allocated. > > As far as I can tell, memory is transferred from low to high mfns. The first > iteration takes about 12 minutes in my test case. Why is the mapping possible > only after the last iteration has finished? The mfn I try to map is in the > first 16 MB of the domain, so it should arrive in the first second! It's pointless to speculate further until you add some hypervisor tracing to determine when your guest pfn of interest is actually allocated. >> Bear in mind that IOCTL_PRIVCMD_MMAPBATCH_V2 will note, but proceed past, >> failed individual mappings. While IOCTL_PRIVCMD_MMAP, for example, will fail >> the entire ioctl() in that situation. There's a reason that xc_restore uses >> the former ioctl! > > I understand that. But what is the difference between xm restore and live > migration? Somehow the memory seems to be treated different. As you already noted, they are almost identical, however they are driven by the stream of memory data they are provided from the original VM. The ordering of pages used to be randomised in xc_domain_save in the live migration case. -- Keir