qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Chris Wright <chrisw@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: [Qemu-devel] Re: KVM call minutes for June 15
Date: Wed, 16 Jun 2010 10:58:29 +0200	[thread overview]
Message-ID: <4C189235.60401@redhat.com> (raw)
In-Reply-To: <20100615151812.GA24131@x200.localdomain>

On 06/15/2010 05:18 PM, Chris Wright wrote:
> - size for each section would be useful (breaks protocol)
>    - while size is possibly useful, breaks protocol

It is not necessary to break the protocol.  If you're okay with only 
having the size information when the migration data has been saved to a 
file, you can put the directory at the end of the migration data, after 
the EOF section.  Something like

    QEMU_VM_SECTION_EOF
    QEMU_VM_SECTION_DIRECTORY
       copy of the migration data, with the actual data replaced
       by a single 8-byte pointer to the beginning of the section:

       QEMU_VM_SECTION_START
       <section id>
       5 "block"
       <instance id>
       <version id>
       <8-byte pointer>

       QEMU_VM_SECTION_START
       <section id>
       3 "ram"
       <instance id>
       <version id>
       <8-byte pointer>

       ...
       QEMU_VM_SECTION_FULL
       <section id>
       10 "cpu_common"
       <instance id>
       <version id>
       <8-byte pointer>

       ...
       QEMU_VM_SECTION_EOF
       <8-byte pointer>

       QEMU_VM_SECTION_DIRECTORY
       <8-byte pointer>

Note that by definition the last 8 bytes will point to the beginning of 
the directory.  You can read the last 18 bytes to reduce (to almost 
zero) the possibility of a false positive.

The directory table can be built at save time and streamed after the EOF 
without causing an error if the receiver closes its connection during 
the streaming of the directory.

Paolo

      parent reply	other threads:[~2010-06-16  8:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15 15:18 [Qemu-devel] KVM call minutes for June 15 Chris Wright
2010-06-15 15:41 ` [Qemu-devel] " Christoph Hellwig
2010-06-15 16:13   ` Anthony Liguori
2010-06-16  6:55     ` Markus Armbruster
2010-06-16  8:58       ` Yoshiaki Tamura
2010-06-16 11:55       ` Arnd Bergmann
2010-06-16 18:07     ` Blue Swirl
2010-06-17  5:15   ` Aurelien Jarno
2010-06-16  8:58 ` Paolo Bonzini [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=4C189235.60401@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=chrisw@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.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).