qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC 18/29] migration: new state "postcopy-recover"


From: Peter Xu
Subject: Re: [Qemu-devel] [RFC 18/29] migration: new state "postcopy-recover"
Date: Wed, 2 Aug 2017 14:42:49 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Tue, Aug 01, 2017 at 12:36:22PM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (address@hidden) wrote:

[...]
> > @@ -2043,9 +2054,32 @@ static bool postcopy_pause(MigrationState *s)
> >          qemu_sem_wait(&s->postcopy_pause_sem);
> >      }
> >  
> > -    trace_postcopy_pause_continued();
> > +    if (s->state == MIGRATION_STATUS_POSTCOPY_RECOVER) {
> > +        /* We were waken up by a recover procedure. Give it a shot */
> >  
> > -    return true;
> > +        /*
> > +         * Firstly, let's wake up the return path now, with a new
> > +         * return path channel.
> > +         */
> > +        qemu_sem_post(&s->postcopy_pause_rp_sem);
> > +
> > +        /* Do the resume logic */
> > +        if (postcopy_do_resume(s) == 0) {
> > +            /* Let's continue! */
> > +            trace_postcopy_pause_continued();
> > +            return true;
> > +        } else {
> > +            /*
> > +             * Something wrong happened during the recovery, let's
> > +             * pause again. Pause is always better than throwing data
> > +             * away.
> > +             */
> > +            goto do_pause;
> 
> You should be able to turn this around into a do {} while or similar
> rather than goto.

Indeed. Fixing up.  Thanks,

-- 
Peter Xu



reply via email to

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