All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hongyang Yang <yanghy@cn.fujitsu.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>, xen-devel@lists.xen.org
Cc: rshriram@cs.ubc.ca, Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com
Subject: Re: [RFC PATCH 1/3] remus: add a bool var to indicate checkpointed stream
Date: Wed, 9 Jul 2014 17:53:30 +0800	[thread overview]
Message-ID: <53BD111A.3080403@cn.fujitsu.com> (raw)
In-Reply-To: <53BD0F3D.8090808@citrix.com>

Hi Andrew,

   Thanks for the comments!

On 07/09/2014 05:45 PM, Andrew Cooper wrote:
> On 09/07/14 08:47, Yang Hongyang wrote:
>> add a bool variable to migration context to indicate checkpointed stream
>>
>> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
>> ---
>>   tools/libxc/saverestore/common.h | 1 +
>>   tools/libxc/saverestore/save.c   | 7 +++++++
>>   tools/libxc/xenguest.h           | 1 +
>>   tools/libxl/libxl_dom.c          | 1 +
>>   4 files changed, 10 insertions(+)
>>
>> diff --git a/tools/libxc/saverestore/common.h b/tools/libxc/saverestore/common.h
>> index 4840d3f..24ba95b 100644
>> --- a/tools/libxc/saverestore/common.h
>> +++ b/tools/libxc/saverestore/common.h
>> @@ -152,6 +152,7 @@ struct xc_sr_context
>>       int fd;
>>
>>       xc_dominfo_t dominfo;
>> +    bool checkpointed;
>
> This appears to only be used on the save side, so should live in the
> .save union.  Also, a comment indicating that this is a remus option.

I also consider to put this in the .save union, but I assume it will
also be used in restore code... So does ctx.firsttime
There's a checkpointed_stream parameter in xc_domain_restore()...

>
>>
>>       union
>>       {
>> diff --git a/tools/libxc/saverestore/save.c b/tools/libxc/saverestore/save.c
>> index 653dc8e..d2fa8a6 100644
>> --- a/tools/libxc/saverestore/save.c
>> +++ b/tools/libxc/saverestore/save.c
>> @@ -652,6 +652,13 @@ int xc_domain_save2(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_ite
>>       ctx.save.callbacks = callbacks;
>>       ctx.save.live  = !!(flags & XCFLAGS_LIVE);
>>       ctx.save.debug = !!(flags & XCFLAGS_DEBUG);
>> +    ctx.checkpointed = !!(flags & XCFLAGS_CHECKPOINTED);
>> +
>> +    if ( ctx.checkpointed ) {
>
> For better or for worse, I have been using the Xen style, as libxc is a
> mix of the two.  For consistency with the rest of the migration v2 code,
> this brace should be on the next line.

Get it!

>
> ~Andrew
>
>> +        /* This is a checkpointed save, we need these callbacks */
>> +        assert(ctx.save.callbacks->checkpoint);
>> +        assert(ctx.save.callbacks->postcopy);
>> +    }
>>
>>       IPRINTF("In experimental %s", __func__);
>>       DPRINTF("fd %d, dom %"PRIu32", max_iters %"PRIu32", max_factor %"PRIu32
>> diff --git a/tools/libxc/xenguest.h b/tools/libxc/xenguest.h
>> index 55755cf..72be3bf 100644
>> --- a/tools/libxc/xenguest.h
>> +++ b/tools/libxc/xenguest.h
>> @@ -28,6 +28,7 @@
>>   #define XCFLAGS_HVM       (1 << 2)
>>   #define XCFLAGS_STDVGA    (1 << 3)
>>   #define XCFLAGS_CHECKPOINT_COMPRESS    (1 << 4)
>> +#define XCFLAGS_CHECKPOINTED    (1 << 5)
>>
>>   #define X86_64_B_SIZE   64
>>   #define X86_32_B_SIZE   32
>> diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
>> index 83eb29a..4a3fd73 100644
>> --- a/tools/libxl/libxl_dom.c
>> +++ b/tools/libxl/libxl_dom.c
>> @@ -1573,6 +1573,7 @@ void libxl__domain_suspend(libxl__egc *egc, libxl__domain_suspend_state *dss)
>>
>>       if (r_info != NULL) {
>>           dss->interval = r_info->interval;
>> +        dss->xcflags |= XCFLAGS_CHECKPOINTED;
>>           if (r_info->compression)
>>               dss->xcflags |= XCFLAGS_CHECKPOINT_COMPRESS;
>>       }
>
> .
>

-- 
Thanks,
Yang.

  reply	other threads:[~2014-07-09  9:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09  7:47 [RFC PATCH 0/3] Remus: add remus support for migration v2 Yang Hongyang
2014-07-09  7:47 ` [RFC PATCH 1/3] remus: add a bool var to indicate checkpointed stream Yang Hongyang
2014-07-09  9:45   ` Andrew Cooper
2014-07-09  9:53     ` Hongyang Yang [this message]
2014-07-09  7:47 ` [RFC PATCH 2/3] remus: implement remus checkpoint in v2 save Yang Hongyang
2014-07-09 10:53   ` Andrew Cooper
2014-07-10  3:25     ` Hongyang Yang
2014-07-10  8:49       ` Ian Campbell
2014-07-10  9:24       ` Andrew Cooper
2014-07-16 15:22   ` Shriram Rajagopalan
2014-07-16 15:38     ` Andrew Cooper
2014-07-16 16:02       ` Shriram Rajagopalan
2014-07-16 16:33         ` Andrew Cooper
2014-07-09  7:47 ` [RFC PATCH 3/3] remus: adjust x86 pv restore to support remus Yang Hongyang
2014-07-09 11:16   ` Andrew Cooper
2014-07-09 11:26     ` Andrew Cooper
2014-07-10  3:30       ` Hongyang Yang
2014-07-10  9:25         ` Andrew Cooper
2014-07-10  9:32           ` Hongyang Yang
2014-07-10  9:42             ` Andrew Cooper
2014-07-10  9:47               ` Hongyang Yang
2014-07-09  8:53 ` [RFC PATCH 0/3] Remus: add remus support for migration v2 Ian Campbell
2014-07-09  9:56   ` Hongyang Yang
2014-07-09  9:42 ` Andrew Cooper
2014-07-09 10:06   ` Hongyang Yang

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=53BD111A.3080403@cn.fujitsu.com \
    --to=yanghy@cn.fujitsu.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=xen-devel@lists.xen.org \
    /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.