qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Juan Quintela <quintela@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, laine@redhat.com, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [RFC 0/7] Optional toplevel sections
Date: Wed, 15 Oct 2014 08:57:09 -0600	[thread overview]
Message-ID: <543E8B45.3040809@redhat.com> (raw)
In-Reply-To: <1413359710-2799-1-git-send-email-quintela@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 5018 bytes --]

On 10/15/2014 01:55 AM, Juan Quintela wrote:
> Hi
> 
> by popular demand, and after too many time, this series.  This is an
> RFC to know what people think about how to use them, the interface
> proposed, whatever.
> 
> * simplify optional subsections moving the "needed" function to
>   vmstate description.  I think that this simplification makes sense
>   by itself, it is indipendent of the rest of the patches.
> 
> * runstate: To make an example of an optional section, I decided to
>   use current runstate.  Right now, we have a problem when:
>   - we start destination without -S
>   - we run migration, and it causes an ioerror on source, but migration finishes
>   - we try to run migration on destination anyways, when it is
>     possible that we could get disk corruption (the ioerror was there for a reason)
>   Luiz: You can see any obvious improvement about how we use runstates?
>   Laine: Could you told me if you (libvirt) like this or would want
>      something a bit different?

Right now, libvirt always uses -S, then just calls 'cont' on the
destination to resume the CPUs (if the migration was live and the source
was in the running state).  But if we start passing other states, 'cont'
might not be the right thing to do.  For example, if the guest is at S3
on the source, how do we transfer from in migration to S3 at the
destination?  Do we need a new monitor command that says to put the
guest into the same state that migration said it should be in (and the
command fails if migration was from an older source that did not send
the subsection)?

How can libvirt introspect that the destination qemu is new enough to
understand the subsections, and/or that the source qemu is new enough to
send the subsections?

> 
> * I sent that option indpendently for new machine types.
> 
> * For old machine types I use this as one example of optional section.
>   We only sent it when the state is different from "running" or "paused".
> 
>   So, the only case where we fail is if we migrate to an old qemu and
>   there is one error.

Seems reasonable.

> 
> * On the runstate subsection "postload" we can send any event for
>   anything that libvirt wants when migration finishes.
>   Laine, can you told us what libvirt would preffer for this?

So you're thinking that an event on the destination emitted stating that
'incoming migration is complete, and requests the following state' is
sufficient for libvirt to know how to put the domain into that state?

> 
> Kevin: You asked for optional sections in the past for the block
>    layer, would this proposal be enough for you?
> 
> Please review, comment.
> 
> Thanks, Juan.
> 
> PD.  Yes, on proper submission, patches 6 and 7 are on the wrong order.
> 
> Juan Quintela (7):
>   migration: Create optional sections
>   runstate: Add runstate store
>   runstate: create runstate_index function
>   runstate: migration allows more transitions now
>   migration: create now section to store global state
>   global_state: Make section optional
>   vmstate: Create optional sections
> 
>  cpus.c                        |  11 ++--
>  docs/migration.txt            |  11 ++--
>  exec.c                        |  11 ++--
>  hw/acpi/ich9.c                |  10 ++--
>  hw/acpi/piix4.c               |  10 ++--
>  hw/block/fdc.c                |  37 +++++--------
>  hw/char/serial.c              |  41 ++++++---------
>  hw/display/qxl.c              |  11 ++--
>  hw/display/vga.c              |  11 ++--
>  hw/i386/pc_piix.c             |   2 +
>  hw/ide/core.c                 |  32 +++++-------
>  hw/ide/pci.c                  |  16 +++---
>  hw/input/pckbd.c              |  22 ++++----
>  hw/input/ps2.c                |  11 ++--
>  hw/isa/lpc_ich9.c             |  10 ++--
>  hw/net/e1000.c                |  11 ++--
>  hw/net/rtl8139.c              |  11 ++--
>  hw/net/vmxnet3.c              |  12 ++---
>  hw/pci-host/piix.c            |  10 ++--
>  hw/scsi/scsi-bus.c            |  11 ++--
>  hw/timer/hpet.c               |  11 ++--
>  hw/timer/mc146818rtc.c        |  23 ++++-----
>  hw/usb/hcd-ohci.c             |  11 ++--
>  hw/usb/redirect.c             |  34 ++++++------
>  hw/virtio/virtio.c            |  10 ++--
>  include/migration/migration.h |   4 ++
>  include/migration/vmstate.h   |  10 ++--
>  include/sysemu/sysemu.h       |   2 +
>  migration.c                   | 117 ++++++++++++++++++++++++++++++++++++++++--
>  savevm.c                      |  14 +++--
>  target-arm/machine.c          |  26 ++++------
>  target-i386/machine.c         |  71 ++++++++++---------------
>  target-ppc/machine.c          |  62 +++++++++-------------
>  vl.c                          |  26 ++++++++++
>  vmstate.c                     |  27 +++++++---
>  35 files changed, 393 insertions(+), 356 deletions(-)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

  parent reply	other threads:[~2014-10-15 14:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15  7:55 [Qemu-devel] [RFC 0/7] Optional toplevel sections Juan Quintela
2014-10-15  7:55 ` [Qemu-devel] [PATCH 1/7] migration: Create optional sections Juan Quintela
2014-10-15  7:55 ` [Qemu-devel] [PATCH 2/7] runstate: Add runstate store Juan Quintela
2014-10-20 10:24   ` Dr. David Alan Gilbert
2014-10-20 10:52     ` Juan Quintela
2014-10-20 15:18       ` Eric Blake
2014-10-22 11:18         ` Dr. David Alan Gilbert
2014-10-22 11:40           ` Markus Armbruster
2014-10-22 15:52             ` Eric Blake
2014-10-15  7:55 ` [Qemu-devel] [PATCH 3/7] runstate: create runstate_index function Juan Quintela
2014-10-15  7:55 ` [Qemu-devel] [PATCH 4/7] runstate: migration allows more transitions now Juan Quintela
2014-10-15 14:42   ` Eric Blake
2014-10-15 15:50     ` Juan Quintela
2014-11-03 12:46   ` Amit Shah
2014-10-15  7:55 ` [Qemu-devel] [PATCH 5/7] migration: create now section to store global state Juan Quintela
2014-10-20 10:52   ` Dr. David Alan Gilbert
2014-10-20 11:11   ` Kevin Wolf
2014-10-15  7:55 ` [Qemu-devel] [PATCH 6/7] global_state: Make section optional Juan Quintela
2014-10-15  7:55 ` [Qemu-devel] [PATCH 7/7] vmstate: Create optional sections Juan Quintela
2014-10-15 14:45   ` Eric Blake
2014-10-15 14:57 ` Eric Blake [this message]
2014-10-15 15:59   ` [Qemu-devel] [RFC 0/7] Optional toplevel sections Juan Quintela
2014-10-15 16:37     ` Eric Blake
2014-10-17 13:41     ` Paolo Bonzini
2014-10-20 14:59       ` Dr. David Alan Gilbert
2014-10-20 11:29 ` Kevin Wolf

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=543E8B45.3040809@redhat.com \
    --to=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=laine@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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 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).