All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: wei.liu2@citrix.com, eddie.dong@intel.com, wency@cn.fujitsu.com,
	andrew.cooper3@citrix.com, yunhong.jiang@intel.com,
	ian.jackson@eu.citrix.com, xen-devel@lists.xen.org,
	guijianfeng@cn.fujitsu.com, rshriram@cs.ubc.ca
Subject: Re: [PATCH Remus v5 2/2] libxc/restore: implement Remus checkpointed restore
Date: Fri, 15 May 2015 10:43:34 +0100	[thread overview]
Message-ID: <1431683014.8943.48.camel@citrix.com> (raw)
In-Reply-To: <5555BDC0.6010801@cn.fujitsu.com>

On Fri, 2015-05-15 at 17:34 +0800, Yang Hongyang wrote:
> 
> On 05/15/2015 05:27 PM, Ian Campbell wrote:
> > On Fri, 2015-05-15 at 17:19 +0800, Yang Hongyang wrote:
> >>
> >> On 05/15/2015 05:09 PM, Ian Campbell wrote:
> >>> On Fri, 2015-05-15 at 09:32 +0800, Yang Hongyang wrote:
> >>>>
> >>>> On 05/14/2015 09:05 PM, Ian Campbell wrote:
> >>>>> On Thu, 2015-05-14 at 18:06 +0800, Yang Hongyang wrote:
> >>>>>> With Remus, the restore flow should be:
> >>>>>> the first full migration stream -> { periodically restore stream }
> >>>>>>
> >>>>>> Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
> >>>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> >>>>>> CC: Ian Campbell <Ian.Campbell@citrix.com>
> >>>>>> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> >>>>>> CC: Wei Liu <wei.liu2@citrix.com>
> >>>>>> ---
> >>>>>>     tools/libxc/xc_sr_common.h  |  14 ++++++
> >>>>>>     tools/libxc/xc_sr_restore.c | 113 ++++++++++++++++++++++++++++++++++++++++----
> >>>>>>     2 files changed, 117 insertions(+), 10 deletions(-)
> >>>>>>
> >>>>>> diff --git a/tools/libxc/xc_sr_common.h b/tools/libxc/xc_sr_common.h
> >>>>>> index f8121e7..3bf27f1 100644
> >>>>>> --- a/tools/libxc/xc_sr_common.h
> >>>>>> +++ b/tools/libxc/xc_sr_common.h
> >>>>>> @@ -208,6 +208,20 @@ struct xc_sr_context
> >>>>>>                 /* Plain VM, or checkpoints over time. */
> >>>>>>                 bool checkpointed;
> >>>>>>
> >>>>>> +            /* Currently buffering records between a checkpoint */
> >>>>>> +            bool buffer_all_records;
> >>>>>> +
> >>>>>> +/*
> >>>>>> + * With Remus, we buffer the records sent by the primary at checkpoint,
> >>>>>> + * in case the primary will fail, we can recover from the last
> >>>>>> + * checkpoint state.
> >>>>>> + * This should be enough because primary only send dirty pages at
> >>>>>> + * checkpoint.
> >>>>>
> >>>>> I'm not sure how it then follows that 1024 buffers is guaranteed to be
> >>>>> enough, unless there is something on the sending side arranging it to be
> >>>>> so?
> >>>>
> >>>> There are only few records at every checkpoint in my test, mostly under 10,
> >>>> probably because I don't do much operations in the Guest. I thought This limit
> >>>> can be adjusted later by further testing.
> >>>
> >>> For some reason I thought these buffers included the page data, is that
> >>> not true? I was expecting the bulk of the records to be dirty page data.
> >>
> >> The page data is not stored in this buffer, but it's pointer stored in
> >> this buffer(rec->data). This buffer is the bulk of the struct xc_sr_record.
> >
> > OK, so there are (approximately) as many xc_sr_records as there are
> > buffered dirty pages? I'd expect this would easily reach 1024 in some
> > circumstances (e..g run a fork bomb in the domain or something)
> 
> No, a record may contain up to 1024 pages, so the record number is less
> than dirty page number.

OK so 1024 records equates to ... <sounds of maths> .... around 4GB of
actual data at most (but I suppose not all recs will use the full 1024
pages).

I suppose a guest would be working quite hard to dirty that without
retriggering a checkpoint (even with colo's more relaxed approach to
resync).

In any case, making the array grow is clearly a good thing to do and
you've already done it, so no need to keep thinking about this case ;-)

      reply	other threads:[~2015-05-15  9:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 10:06 [PATCH Remus v5 0/2] Remus support for Migration-v2 Yang Hongyang
2015-05-14 10:06 ` [PATCH Remus v5 1/2] libxc/save: implement Remus checkpointed save Yang Hongyang
2015-05-14 12:47   ` Ian Campbell
2015-05-15  2:12     ` Yang Hongyang
2015-05-15  8:29       ` Andrew Cooper
2015-05-15  8:37         ` Yang Hongyang
2015-05-15  9:31           ` Andrew Cooper
2015-05-15  9:40             ` Yang Hongyang
2015-05-14 10:06 ` [PATCH Remus v5 2/2] libxc/restore: implement Remus checkpointed restore Yang Hongyang
2015-05-14 10:11   ` Andrew Cooper
2015-05-14 13:05   ` Ian Campbell
2015-05-14 13:17     ` Andrew Cooper
2015-05-14 14:04       ` Ian Campbell
2015-05-15  1:08         ` Yang Hongyang
2015-05-15  1:32     ` Yang Hongyang
2015-05-15  9:09       ` Ian Campbell
2015-05-15  9:19         ` Yang Hongyang
2015-05-15  9:27           ` Ian Campbell
2015-05-15  9:34             ` Andrew Cooper
2015-05-15  9:34             ` Yang Hongyang
2015-05-15  9:43               ` Ian Campbell [this message]

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=1431683014.8943.48.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=wei.liu2@citrix.com \
    --cc=wency@cn.fujitsu.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yanghy@cn.fujitsu.com \
    --cc=yunhong.jiang@intel.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.