[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] libxl - API call to return sxpr of a domain?
On Tue, Jun 7, 2011 at 12:16 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> wrote:
On the receiving end, there is "no" Remus receiver process. Well, there are some remus related patches, that have long been integrated into xc_domain_restore, but apart from that, everything else is as-is. The only remus specific part on rx side, is the blktap2 userspace driver (block-remus), which again gets activated by usual Xend control flow (as it tries to create a tap device). But I dont think this needs special treatment as long as xl can parse/accept spec like tap:remus:backupHost:port|aio:/dev/foo (or tap2:remus:.. ). and launch the appropriate blktap2 backend driver (this system is already in place, afaik). The bulk of Remus transmission data is in libxc and hence is agnostic to both xend/xl. It basically prolongs the last iteration for eternity. It supplies a callback handler for checkpoint, which adds the "wait" time before the next suspend (e.g., suspend every 50ms). In case of Xend, the checkpoint handler is not supplied and hence the domain is suspended as soon as the previous iteration finishes. (a) On the sending side, without Remus, Xend control flow is as follows: xm migrate --live <domain> <host> (i) XendCheckpoint:save [which writes the signature record, sxp to the socket] and issues "xc_save <params>" (ii) xc_save calls xc_domain_save with appropriate callback handlers for suspend & switch_qemu_logdirty only. These handlers are in libxc/xcutils/xc_save.c. (iv) xc_domain_save: send dirty pages for max_iters if (last_iter) suspend_callback() send final set of dirty pages send tailbuf data The callback structure has two other handlers (postcopy aka postresume, checkpoint) that is used by Remus. ************************* (b) On sending side, with Remus remus <domain> <host> (i) tools/remus/remus: - calls tools/python/xen/remus/vm.py:VM(domid) - vm.py:VM issues xmlrpc call to Xend to obtain domid's sxpr and extract out the disk/vif info. (ii) create the "buffers" for disk & vif. (iii) Connect with remote host's Xend socket and send the sxp info. [same as (i) for non Remus case] (iv) tools/python/xen/remus/save.py:Saver uses libcheckpoint to initiate checkpointing. tools/python/xen/lowlevel/checkpoint: has suspend/resume handlers similar to xc_save.c trampoline functions to bounce the callbacks for suspend, postcopy and checkpoint to their python equivalents. tools/python/xen/lowlevel/checkpoint/libcheckpoint.c:checkpoint_start calls xc_domain_save with all needed callback handlers. ---> functionally equivalent to (ii) in non-Remus case. (v) xc_domain_save: (after the initial iterations) copypages: send dirty pages & tailbuf data postcopy_callback() [resumes domain] checkpoint_callback() netbuffer_checkpoint() [python - communicates via netlink to sch_plug] diskbuffer_checkpoint() [python - communicates via fifo to block-remus] sleep(50ms) [or whatever checkpoint interval] return suspend_callback() goto copypages Hope that explains the control flow. shriram Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |