On Wed, Jul 28, 2010 at 19:51, Juan Quintela <quint...@redhat.com> wrote:
> TeLeMan <gele...@gmail.com> wrote:
>> On Wed, Jul 28, 2010 at 18:43, Juan Quintela <quint...@redhat.com> wrote:
>>> TeLeMan <gele...@gmail.com> wrote:
>>>> If the new version adds the new subsection for some vmstate, the old
>>>> version will load the new version's vmstate unsuccessfully. So we have
>>>> to ignore the unrecognized subsections.
>>>
>>> No. That was the whole point of subsections. If one subsection is
>>> sent, target machine has to understand it. If it don't understand it,
>>> it fails.
>>>
>>> If subsection is not needed, it is the responsability of the source to
>>> not send it.
>>>
>>> This was one of the design requirements. Subsections are optional but
>>> it is the source which decides which ones to send/not to send. The
>>> target has to understand everything that it gets or fail the migration.
>>>
>>
>> If the target must understand everything, the vmstate's version will
>> be useless because the old version target maybe cannot load the new
>> version target's vmstate.
>
> That is the whole point. See the ide example that I also sent.
>
> We have an old version of qemu, that don't understand pio ide fields.
> We get a new qemu version that has pio ide fields in the state.
>
> notice that migration in the middle of a pio operation is a very rare
> event. for instance, if you are using linux as a guest, pio is only
> used during boot, and not so many times (around 30000 calls during
> boot).
>
> Without subsections, you will be unable to migrate from new qemu to old
> qemu, because old qemu don't understand the pio fields.
>
> With subsections, if we are in the middle of a pio operation, we sent
> pio subsection and migration to old qemu will fail.
>
> But if we aren't in the middle of a pio operation, pio information will
> not be sent and migration will succeed.
>
> This is special important for the stable branch, where we are supposed
> to be backwards compatible, but sometimes we find a bug, and we really
> have to change the savevm format.
>
> This allows us that after creating the subsection, we can still migrate
> to the old version the majority of the time.
>
> Notice that this bugfixes are normally rare cases, because if it were
> the normal case, we would have already detected it before the release.
>
> If we sent the subsection, it means that target needs to understand it,
> or state will be broken (one way or another).
>
> I hope this hepls to understand how subsections are supposed to work.
>
> Thanks for the comments, Juan.
>
I see, thanks a lot. But I still hope to have the similar subsection
that can be ignored simply.