qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, quintela@redhat.com, lvivier@redhat.com,
	pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH f0r 2.11] runstate/migrate: Two more transitions
Date: Tue, 8 Aug 2017 09:59:09 +0800	[thread overview]
Message-ID: <20170808015909.GA31474@pxdev.xzpeter.org> (raw)
In-Reply-To: <20170807122529.GA2504@work-vm>

On Mon, Aug 07, 2017 at 01:25:29PM +0100, Dr. David Alan Gilbert wrote:
> * Peter Xu (peterx@redhat.com) wrote:
> > On Fri, Aug 04, 2017 at 06:50:11PM +0100, Dr. David Alan Gilbert (git) wrote:
> > > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > > 
> > > There's a race if someone does a 'stop' near the end of migrate;
> > > the migration process goes through two runstates:
> > >     'finish migrate'
> > >     'postmigrate'
> > > 
> > > If the user issues a 'stop' between the two we end up with invalid
> > > state transitions.
> > > Add the transitions as valid.
> > > 
> > > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > > ---
> > >  vl.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/vl.c b/vl.c
> > > index 99fcfa0442..bacb03f49d 100644
> > > --- a/vl.c
> > > +++ b/vl.c
> > > @@ -621,6 +621,7 @@ static const RunStateTransition runstate_transitions_def[] = {
> > >  
> > >      { RUN_STATE_PAUSED, RUN_STATE_RUNNING },
> > >      { RUN_STATE_PAUSED, RUN_STATE_FINISH_MIGRATE },
> > > +    { RUN_STATE_PAUSED, RUN_STATE_POSTMIGRATE },
> > >      { RUN_STATE_PAUSED, RUN_STATE_PRELAUNCH },
> > >      { RUN_STATE_PAUSED, RUN_STATE_COLO},
> > >  
> > > @@ -633,6 +634,7 @@ static const RunStateTransition runstate_transitions_def[] = {
> > >      { RUN_STATE_PRELAUNCH, RUN_STATE_INMIGRATE },
> > >  
> > >      { RUN_STATE_FINISH_MIGRATE, RUN_STATE_RUNNING },
> > > +    { RUN_STATE_FINISH_MIGRATE, RUN_STATE_PAUSED },
> > >      { RUN_STATE_FINISH_MIGRATE, RUN_STATE_POSTMIGRATE },
> > >      { RUN_STATE_FINISH_MIGRATE, RUN_STATE_PRELAUNCH },
> > >      { RUN_STATE_FINISH_MIGRATE, RUN_STATE_COLO},
> > 
> > Do we need this as well?
> > 
> >     { RUN_STATE_POSTMIGRATE, RUN_STATE_PAUSED },
> 
> Apparently not:
> 
> (qemu) migrate "exec:cat > /dev/null"
> (qemu) infomigrate
> unknown command: 'infomigrate'
> (qemu) info status
> VM status: paused (postmigrate)
> (qemu) stop
> (qemu) info status
> VM status: paused (postmigrate)
> (qemu)
> 
> 
> so doing a stop at that point doesn't seem to cause any problem.

Yes. Thanks.

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu

  reply	other threads:[~2017-08-08  1:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04 17:50 [Qemu-devel] [PATCH f0r 2.11] runstate/migrate: Two more transitions Dr. David Alan Gilbert (git)
2017-08-07  7:21 ` Peter Xu
2017-08-07 12:25   ` Dr. David Alan Gilbert
2017-08-08  1:59     ` Peter Xu [this message]
2017-08-08  7:02 ` Juan Quintela
2017-08-08  7:13   ` Peter Xu
2017-09-06 13:40 ` Dr. David Alan Gilbert
2017-09-09 13:57   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170808015909.GA31474@pxdev.xzpeter.org \
    --to=peterx@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).