qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/7] runstate: Add runstate store


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/7] runstate: Add runstate store
Date: Mon, 20 Oct 2014 09:18:19 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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.

> 
> 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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]