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

On 15/05/2015 03:12, Yang Hongyang wrote:
>
>>> @@ -467,6 +477,14 @@ static int send_domain_memory_live(struct
>>> xc_sr_context *ctx)
>>>       DECLARE_HYPERCALL_BUFFER_SHADOW(unsigned long, dirty_bitmap,
>>>                                       &ctx->save.dirty_bitmap_hbuf);
>>>
>>> +    /*
>>> +     * With Remus, we will enter checkpointed save after live
>>> migration.
>>> +     * In checkpointed save loop, we skip the live part and pause
>>> straight
>>> +     * away to send dirty pages between checkpoints.
>>> +     */
>>> +    if ( !ctx->save.live )
>>> +        goto last_iter;
>>
>> Rather than use goto would it work to refactor everything from here to
>> the label into some sort of helper and just call that in the "actually
>> live" case?
>>
>> Or perhaps everything from the label to the end should be a helper
>> function which the caller can also use in thecheckpoint case instead of
>> calling send_domain_memory_live (and which s_d_m_l also calls of
>> course).
>
> I'm going to refactor the send_domain_memory_live() as follows:
>
> split the send_domain_memory_live() into three helper function:
>   - send_memory_live()  do the actually live case
>   - suspend_and_send_dirty() suspend the guest and send dirty pages
>   - send_memory_verify()
>
> then:
>   - send_domain_memory_live() combination of those three helper functions
>   - send_domain_momory_checkpointed() calls suspend_and_send_dirty() and
>                                       send_memory_verify()
>   - send_domain_memory_nonlive() stay as it is
> Does it make sense?

verify mode is only a debugging tool, and shouldn't be used in general. 
(It is actually a lot less useful in retrospect than one would imagine.)

However, the rest of the split looks plausible.

~Andrew

  reply	other threads:[~2015-05-15  8:29 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 [this message]
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

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=5555AE4C.5070908@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=ian.campbell@citrix.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.