qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 47/47] End of migration for postcopy


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH v4 47/47] End of migration for postcopy
Date: Tue, 7 Oct 2014 11:29:38 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

* Paolo Bonzini (address@hidden) wrote:
> Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto:
> > +            mis->postcopy_ram_state);
> > +    if (mis->postcopy_ram_state == POSTCOPY_RAM_INCOMING_ADVISE) {
> > +        /*
> > +         * Where a migration had postcopy enabled (and thus went to advise)
> > +         * but managed to complete within the precopy period
> > +         */
> > +        postcopy_ram_incoming_cleanup(mis);
> > +    } else {
> > +        if ((ret >= 0) &&
> > +            (mis->postcopy_ram_state > POSTCOPY_RAM_INCOMING_ADVISE)) {
> 
> Instead of the >, it is perhaps nicer to use an outer if that checks for
> state != NONE?  Because in fact this check is for state != NONE, having
> ADVISE been handled above.

You mean something like this (untested) ?

  if (mis->postcopy_ram_state != POSTCOPY_RAM_INCOMING_NONE) {
      if (mis->postcopy_ram_state == POSTCOPY_RAM_INCOMING_ADVISE) {
          /*
           * Where a migration had postcopy enabled (and thus went to advise)
           * but managed to complete within the precopy period
           */
          postcopy_ram_incoming_cleanup(mis);
      } else if (ret >= 0) {
           /*
            * Postcopy was started, cleanup should happen at the end of the
            * postcopy thread.
            */
           DPRINTF("process_incoming_migration_co: exiting main branch");
           return;
      }
  }

Dave

> Paolo
> 
> > +            /*
> > +             * Postcopy was started, cleanup should happen at the end of 
> > the
> > +             * postcopy thread.
> > +             */
> > +            DPRINTF("process_incoming_migration_co: exiting main branch");
> > +            return;
> > +        }
> > +    }
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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