[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/7] runstate: Add runstate store
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH 2/7] runstate: Add runstate store |
Date: |
Wed, 22 Oct 2014 12:18:52 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
* Eric Blake (address@hidden) wrote:
> On 10/20/2014 04:52 AM, Juan Quintela wrote:
> > "Dr. David Alan Gilbert" <address@hidden> wrote:
> >> * Juan Quintela (address@hidden) wrote:
> >>> This allows us to store the current state to send it through migration.
> >>
> >> Why store the runstate as a string? The later code then ends up doing
> >> string compares and things - why not just use the enum value?
> >
> > How do you know that it has the same values both sides? As far as I can
> > see, all interaction with the outside is done with strings (i.e. QMP).
>
> If it's part of the migration stream, then it is not something visible
> in QMP, and it is your own fault if you ever change the enum values in
> such a way that the migration stream is incompatible between versions.
> I think using an enum in the migration stream is just fine, and more
> efficient.
I think the question here really comes from RunState being an enum defined
in qapi-schema.json; so we could use that directly in the migration stream
if we were guaranteed that the encoding of that enum wasn't going to change.
Does qapi make any guarantees about the enum encoding?
Dave
>
> >
> > But it is easier for me if I can sent the numeric value.
> >
> > Libvirt folks?
>
> As far as I can tell, libvirt is unimpacted by HOW it is represented in
> the migration stream, only that the destination is able to inform
> libvirt what state was received as part of migration, with libvirt
> having an easy way to then get back into that state (of course, libvirt
> should also still have the option to choose a different state than what
> just got migrated, as in the case where the user pauses the source in
> order to avoid convergence problems but wants the destination to start
> running again).
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
[Qemu-devel] [PATCH 1/7] migration: Create optional sections, Juan Quintela, 2014/10/15
[Qemu-devel] [PATCH 3/7] runstate: create runstate_index function, Juan Quintela, 2014/10/15
[Qemu-devel] [PATCH 4/7] runstate: migration allows more transitions now, Juan Quintela, 2014/10/15
[Qemu-devel] [PATCH 7/7] vmstate: Create optional sections, Juan Quintela, 2014/10/15
[Qemu-devel] [PATCH 5/7] migration: create now section to store global state, Juan Quintela, 2014/10/15