All of lore.kernel.org
 help / color / mirror / Atom feed
From: tgh <wwwwww4187@sina.com.cn>
To: Daniel Stodden <stodden@cs.tum.edu>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: question about dominfo.completeRestore()
Date: Thu, 28 Feb 2008 21:49:39 +0800	[thread overview]
Message-ID: <47C6BBF3.1040306@sina.com.cn> (raw)
In-Reply-To: <1204026247.10344.41.camel@thinkpad.localdomain>

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

  parent reply	other threads:[~2008-02-28 13:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080226095701.50167.qmail@dhost033.magnet.ch>
2008-02-26 11:22 ` code read problems tgh
2008-02-26 11:44   ` Daniel Stodden
2008-02-27  9:37     ` tgh
2008-02-27 19:23       ` Mike Sun
2008-02-28 18:52         ` Brendan Cully
2008-02-28 20:53           ` Mike Sun
2008-02-29  6:44           ` tgh
2008-02-29 13:39             ` Daniel Stodden
2008-03-01  1:21               ` tgh
2008-03-04  5:41                 ` tgh
2008-02-28 13:49     ` tgh [this message]
2008-02-26 12:15   ` Christoph Egger
2008-02-26 17:20     ` pradeep singh rautela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47C6BBF3.1040306@sina.com.cn \
    --to=wwwwww4187@sina.com.cn \
    --cc=stodden@cs.tum.edu \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.