qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migratio


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream
Date: Thu, 15 May 2014 13:16:51 +0300

On Thu, May 15, 2014 at 12:11:12PM +0200, Andreas Färber wrote:
> Am 15.05.2014 12:03, schrieb Michael S. Tsirkin:
> > On Thu, May 15, 2014 at 11:58:25AM +0200, Andreas Färber wrote:
> >> Am 15.05.2014 11:52, schrieb Michael S. Tsirkin:
> >>> On Thu, May 15, 2014 at 11:20:18AM +0200, Andreas Färber wrote:
> >>>> Am 15.05.2014 09:04, schrieb Greg Kurz:
> >>>>> On Thu, 15 May 2014 12:16:35 +0530
> >>>>> Amit Shah <address@hidden> wrote:
> >>>>>> On (Thu) 15 May 2014 [09:23:51], Michael S. Tsirkin wrote:
> >>>>>>> On Thu, May 15, 2014 at 11:34:25AM +0530, Amit Shah wrote:
> >>>>>>>> On (Wed) 14 May 2014 [17:41:38], Greg Kurz wrote:
> >>>>>>>>> Since each virtio device is streamed in its own section, the idea 
> >>>>>>>>> is to
> >>>>>>>>> stream subsections between the end of the device section and the 
> >>>>>>>>> start
> >>>>>>>>> of the next sections. This allows an older QEMU to complain and exit
> >>>>>>>>> when fed with subsections:
> >>>>>>>>>
> >>>>>>>>> Unknown savevm section type 5
> >>>>>>>>> Error -22 while loading VM state
> >>>>>>>>
> >>>>>>>> Please make this configurable -- either via configure or device
> >>>>>>>> properties.  That avoids having to break existing configurations that
> >>>>>>>> work without this patch.
> >>>>
> >>>> Since backwards migration is not supported upstream, wouldn't it be
> >>>> easiest to just add support for the subsection marker and skipping to
> >>>> the end of section in that downstream?
> >>>
> >>> Backwards and forwards migration need to be supported,
> >>> customers told us repeatedly. So some downstreams support this
> >>> and not supporting it upstream just means downstreams need
> >>> to do their own thing.
> >>>
> >>> As importantly, ping-pong migration is the only
> >>> reliable way to stress migration.
> >>>
> >>> So if we want to test cross-version we need it to work
> >>> both way.
> >>>
> >>> Finally, the real issue and difficulty with cross-version migration is
> >>> making VM behave in a backwards compatible way.  Serializing in a
> >>> compatible way is a trivial problem, or would be if the code wasn't a
> >>> mess :) Once you do the hard part, breaking migration because of the
> >>> trivial serialization issue is just silly.  And special-casing forward
> >>> migration does not make code simpler, it really only leads to
> >>> proliferation of hacks and lack of symmetry.
> >>>
> >>> So yes it's a useful feature, and no not supporting it does
> >>> not help anyway.
> >>
> >> It seems you misunderstand. I was not saying it's not useful.
> >>
> >> My point is that VMStateSubsections added in newer versions (and thus
> >> not existing in older versions) need to be handled for any
> >> VMState-converted devices. So why can't we make that work for virtio too?
> > 
> > Sure.
> > AFAIK the way to this works is by adding an "field_exists" callback,
> > and not sending the section when we are in a compat mode.
> 
> OK, but upstream always sends the latest version today.
> So isn't that
> just two ifs that you would need to add in save and load functions added
> here for the downstream? x86_64 is unaffected from ppc's endianness
> changes and you still do ppc64 BE, so there's no real functional problem
> for RHEL, is there?
> 
> Andreas

I'm sorry I don't understand what you are saying here.
Simply put, if you specify a compatible -M then your
device should behave, and migrate, exactly like and old
qemu did.

With *any* change, there's always the temptation to say
"oh but old behaviour was too buggy we should just ignore it".
Seems to make sense in each case but does not scale,
you end up with breakages in all version without exception.
So this should be a very high bar to overcome.



> -- 
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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