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

[Xen-devel] question about dominfo.completeRestore()

To: Daniel Stodden <stodden@xxxxxxxxxx>
Subject: [Xen-devel] question about dominfo.completeRestore()
From: tgh <wwwwww4187@xxxxxxxxxxx>
Date: Thu, 28 Feb 2008 21:49:39 +0800
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 28 Feb 2008 05:50:06 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1204026247.10344.41.camel@xxxxxxxxxxxxxxxxxxxx>
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>
References: <20080226095701.50167.qmail@xxxxxxxxxxxxxxxxxx> <47C3F680.80102@xxxxxxxxxxx> <1204026247.10344.41.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)
hi
 I read the code of restore() in checkpoint.py for paravirt
and restore() calls for the dominfo.completeRestore(),which call _registerWatches(), and then call refreshShutdown(), and in refreshShutdown(),if elif xeninfo['shutdown']: and if reason == 'suspend' ,self._unwatchVM()will be called ,

                   if reason == 'suspend':
                       self._stateSet(DOM_STATE_SUSPENDED)
                       # Don't destroy the domain.  XendCheckpoint will do
                       # this once it has finished.  However, stop watching
                       # the VM path now, otherwise we will end up with one
                       # watch for the old domain, and one for the new.
                       self._unwatchVm()

and then ,why do we call _registerWatches() before refreshShutdown(),i am confused about it, and what is the function of dominfo.completeRestore()? it introducedomain(),and storeDomDetails() and registerWatches()and ,refreshShutdown(),and why should it refreshShutdown()?and is it that in refreshShutdown(),the old domain is cleaned and destoryed, or the new domain is dealt with? i am confused

and the code of save() in the checkpoint.py, how does the saveInputHandler synchronize with the XC_SAVE ? how many times do they synchronize with each other? only ,XC_SAVE sends "suspend" to saveInputHandler, and then saveInputHandler send "done" to XC_SAVE ,is it right?
       def saveInputHandler(line, tochild):
           log.debug("In saveInputHandler %s", line)
           if line == "suspend":
               log.debug("Suspending %d ...", dominfo.getDomid())
               dominfo.shutdown('suspend')
               dominfo.waitForShutdown()
dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,domain_name)
               log.info("Domain %d suspended.", dominfo.getDomid())
dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP3,domain_name)
               #send signal to device model for save
               if hvm:
                   log.info("release_devices for hvm domain")
                   dominfo._releaseDevices(True)
               tochild.write("done\n")
               tochild.flush()
               log.debug('Written done')

and how many times does XC_SAVE synchronize with Handler, i read the code , and just find only one time ,is it right? and what is the function of the dominfo.migrateDevices with DEV_MIGRATE_STEP2 and DEV_MIGRATE_STEP3, i read the code ,but still confused, does it put the information of the devices into the checkpoint file , or what? and how does xen deal with the requests of devices in the ring and gnttb and backend ,how does it store them? i have not find the code to deal with it?


could you help me

Thanks in advance



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