[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

 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':
                       # 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.

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.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")
               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



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.