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] Migrate - Memory transfer code ?

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Migrate - Memory transfer code ?
From: Chanda Mama <xen_nt@xxxxxxxxx>
Date: Tue, 16 Aug 2005 17:05:53 -0700 (PDT)
Delivery-date: Wed, 17 Aug 2005 00:04:06 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Ll1SC/XpBPo98LivEwHmAPFBDuoIc3XaiVXZvCnCJPwfBYOttERJZhR+p38Fmh3n4KjPOUer3XVgP8NAnoHgRrGOc7TRiiSmOqXx3DLo015AlHtSqgNPDBvMpNgTyqsIWzItleIrgyQwO1nd3Rv9+f/VUyZg9tdRnUEDnE+Z/dY= ;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hello All,

I am trying to find out the code segment for migration
of domains happen.

The following code in xfrd.c somehow does not lead me
to the place where the actual memory transfer to the
peer happens.

------------------------------------------------------

/** Migrate a vm to another node.
 *
 * @param xend connection
 * @return 0 on success, error code otherwise
 */
int xfr_send(Args *args, XfrState *state, Conn *xend,
uint32_t addr, uint32_t port){
    int err = 0;
    Conn _peer = {}, *peer = &_peer;
    int flags = 0;
    struct in_addr xfr_addr;
    uint16_t xfr_port;
    time_t t0 = time(NULL), t1;

    dprintf(">\n");
    flags |= CONN_NOBUFFER;
    if(args->compress){
        flags |= CONN_WRITE_COMPRESS;
    }
    xfr_addr.s_addr = addr;
    xfr_port = port;
    if(!xfr_port) xfr_port = htons(XFRD_PORT);
    dprintf("> Xfr vmid=%u\n", state->vmid);
    dprintf("> Xfr xfr_addr=%s:%d\n",
inet_ntoa(xfr_addr), ntohs(xfr_port));
    err = Conn_connect(peer, flags, xfr_addr,
xfr_port);
    if(err) goto exit;
    XfrState_set_state(state, XFR_HELLO);
    // Send hello message.
    err = xfr_send_hello(peer);
    if(err) goto exit;
    printf("\n");
    // Send vm state.
    err = xfr_send_state(state, xend, peer);
    if(err) goto exit;
    if(args->compress){
        IOStream *zio = peer->out;
        int plain_bytes = lzi_stream_plain_bytes(zio);
        int comp_bytes = lzi_stream_comp_bytes(zio);
        float ratio = lzi_stream_ratio(zio);
        iprintf("> Compression: plain %d bytes,
compressed %d bytes, ratio %3.2f\n",
                plain_bytes, comp_bytes, ratio);
    }
------------------------------------------------------

Looks like the memory transfer happens somewhere after
the hello message to peer is sent, but am not able to
figure out where.

Would someone point me out ?

Appreciate your help,

best regards,
-- Chanda









                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Migrate - Memory transfer code ?, Chanda Mama <=