WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] migration and restore?

To: Andre Przywara <andre.przywara@xxxxxxx>
Subject: Re: [Xen-devel] migration and restore?
From: Daniel Stodden <dns@xxxxxxxxxxxx>
Date: Tue, 08 Jan 2008 13:57:56 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, tgh <wwwwww4187@xxxxxxxxxxx>
Delivery-date: Fri, 18 Jan 2008 10:31:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4783699F.20201@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Bundesprüfstelle für jugendgefährdende Mädchen
References: <20080102151826296.00000000500@djm-pc> <200801030151.05435.mark.williamson@xxxxxxxxxxxx> <477DEAA4.3040204@xxxxxxxxxxx> <4783699F.20201@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2008-01-08 at 13:16 +0100, Andre Przywara wrote:
> > i read the code of migration, and i fail to find the counterpart code of 
> > migration , which deal with the restoration of VM in the destination 
> > node, and i read the code of /tools/libxc/xc_domain_restore.c ,but the 
> > function of xc_domain_restore() seems not to be the one for the 
> > migration, it seems not support the restore of the iterative copy of the 
> > VM memory state ,is it? or how does it deal with the work?
> 
> Maybe the missing pieces you are looking for are in the xend (Python) 
> code? In line 205 (or so) in tools/pyhton/xen/xend/XendDomainInfo.py you 
> will find the high level function "restore". This method calls 
> XendDomainInfo.resume (line 446) and triggers the necessary actions 
> here. Another file to look in is XendCheckpoint.py, here you'll find the 
> method "restore" (line 154). Some Migration code is also in XendDomain.py.
> You can get more info if you enable debugging, do a live migration (to 
> localhost) and look in xend.log for "Saving memory pages" or "Reloading 
> memory pages". From here you will find the corresponding code (maybe by 
> just grepping for the log message text).
> I found line 427 in xc_domain_restore.c, the code following this line 
> deals with the restoring of the frames. From my perspective there is 
> everything needed in there.

this is correct, the iteration is definitely done in
xc_domain_restore().

the for loop as described above follows iteration as dictated by the
source machine. each interation generates a number of batches, each
batch comprising a number of pages, either first try or (later) resent
due to being dirtied. each batch is dispatched in several passes. the
second pass generates the machine frame list into which the batch is
read. the most interesting part where that memory is mapped and filled
with frame contents starts in line 533 (xc_map_foreign_range) and the
subsequent for-loop in line 544 resp.

complete enough to follow without the addtional setup done by xend.
tools/xcutils/ contains C programs calling into the library for save and
restore. should be easy to call from the command line once the parameter
meanings are understood; i'd suggest to build with debug output enabled
and follow the stderr messages to see how it works.

regards,
daniel


-- 
dns@xxxxxxxxxxxx

Wire up your home and stay there.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>