xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Keir Fraser <keir@xen.org>,
	Ian Campbell <Ian.Campbell@citrix.com>, Tim Deegan <tim@xen.org>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>,
	Frediano Ziglio <frediano.ziglio@citrix.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 0/6] [VERY RFC] Migration Stream v2
Date: Mon, 14 Apr 2014 19:06:36 +0100	[thread overview]
Message-ID: <534C23AC.2050806@citrix.com> (raw)
In-Reply-To: <CAFLBxZZCoD1GHGOiDxMXK1=+v30FGKtsZOv8iykhrBf57Y6d+A@mail.gmail.com>

On 14/04/14 18:49, George Dunlap wrote:
> On Thu, Apr 10, 2014 at 12:21 PM, Andrew Cooper
> <andrew.cooper3@citrix.com> wrote:
>> On 10/04/14 11:42, Ian Campbell wrote:
>>> On Wed, 2014-04-09 at 19:28 +0100, Andrew Cooper wrote:
>>>> Some design decisions have been take very deliberately (e.g. splitting the
>>>> logic for PV and hvm migration) while others have been more along the lines of
>>>> "I think its a sensible thing to do given a lack of any evidence/opinion to
>>>> the contrary".
>>> Is there some indication of which is which?
>> Not really, given the clean rewrite, and also that it is only partially
>> complete.
>>
>>> Should we check in the desigh/spec which was previously posted as part
>>> of this?
>> I knew I forgot something...
>>
>> http://xenbits.xen.org/people/andrewcoop/domain-save-format-E.pdf
>
> What did you imagine might constitute an "Optional" record?
>
> Other than that, everything looks sensible so far -- but having only
> save/restore of one guest type is the easy bit.  It's when you start
> to have to multiplex across {PV, HVM, PVH} x {disk, network, remus}
> that things are going to get more "interesting".
>
>  -George

I did not opt for optional records, nor did I author them into the
spec.  Frankly, I cannot forsee a need for anything other than mandatory
records.  Nothing required for migration can possibly be optional, and
anything else is likely to be toolstack data which necessarily has to be
ahead of the domain in the migration stream so the receiving toolstack
can create a suitable domain for the new xc_domain_restore() to restore
into.

As for multiplexing, I have been considering that given the
implementation of the live part of migration (which now works, as of a
few hours ago).

Domain save and domain restore are two very very different operations. 
Save involves prodding at a live domain and stuffing values into a
stream.  Restore involves taking stuff from a stream and updating paused
state.

A lot of the structure of save is common to all types of domain and
roughly follows:

send some headers
start logdirty
send some preamble state (p2m size, p2m etc)
while consulting dirty bitmap:
   send some memory
pause domain
send remaining memory
send postamble state (vcpus, tsc, qemu blob etc)
send end record

I was considering writing a common save routine with domain/arch hooks. 
This would allow for one canonical implementation of the save code
(including how to do the 'live' bit, or how to apply remus) while
separating the architecture bits.

Restore on the other hand is much more simple, and just involves reading
records from the stream in the order found and applying the required
changes to the specified domain.  Each architecture can have a do {}
while() loop which accepts valid records for the specific type of domain.

I will experiment with the domain/arch hooks when implementing HVM
migration (which should be rather more simple)

~Andrew

  reply	other threads:[~2014-04-14 18:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-09 18:28 [PATCH 0/6] [VERY RFC] Migration Stream v2 Andrew Cooper
2014-04-09 18:28 ` [PATCH 1/6] [HACK] tools/libxc: save/restore v2 framework Andrew Cooper
2014-04-09 18:28 ` [PATCH 2/6] tools/libxc: Stream specification and some common code Andrew Cooper
2014-04-09 18:28 ` [PATCH 3/6] tools/libxc: Scripts for inspection/valdiation of legacy and new streams Andrew Cooper
2014-04-09 18:28 ` [PATCH 4/6] tools/libxc: x86 pv common code Andrew Cooper
2014-04-09 18:28 ` [PATCH 5/6] tools/libxc: x86 pv save implementation Andrew Cooper
2014-04-09 18:28 ` [PATCH 6/6] tools/libxc: x86 pv restore implementation Andrew Cooper
2014-04-10 10:42 ` [PATCH 0/6] [VERY RFC] Migration Stream v2 Ian Campbell
2014-04-10 11:21   ` Andrew Cooper
2014-04-10 13:05     ` Frediano Ziglio
2014-04-10 13:49       ` Andrew Cooper
2014-04-14 17:49     ` George Dunlap
2014-04-14 18:06       ` Andrew Cooper [this message]
2014-04-14 18:16         ` George Dunlap
2014-04-14 23:43           ` Andrew Cooper
2014-04-14 18:11       ` David Vrabel
2014-04-15  8:30         ` Frediano Ziglio
2014-04-15 10:35         ` Ian Jackson
2014-04-15 10:38           ` George Dunlap
2014-04-23 13:47 ` Ian Campbell
2014-04-23 14:02   ` Andrew Cooper
2014-04-23 14:13     ` 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=534C23AC.2050806@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=david.vrabel@citrix.com \
    --cc=frediano.ziglio@citrix.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).