qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Wei Yang <richardw.yang@linux.intel.com>
Cc: qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [PATCH 1/3] migration/postcopy: mis->have_listen_thread check will never be touched
Date: Tue, 8 Oct 2019 19:47:42 +0100	[thread overview]
Message-ID: <20191008184742.GK3441@work-vm> (raw)
In-Reply-To: <20191006000249.29926-2-richardw.yang@linux.intel.com>

* Wei Yang (richardw.yang@linux.intel.com) wrote:
> If mis->have_listen_thread is true, this means current PostcopyState
> must be LISTENING or RUNNING. While the check at the beginning of the
> function makes sure the state transaction happens when its previous
> PostcopyState is ADVISE or DISCARD.
> 
> This means we would never touch this check.
> 
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>

Yes, OK - although I think it's OK sometimes to leave in checks
for things you don't expect to happen!


Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  migration/savevm.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/migration/savevm.c b/migration/savevm.c
> index feb757de79..eaa4cf58ef 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -1878,11 +1878,6 @@ static int loadvm_postcopy_handle_listen(MigrationIncomingState *mis)
>          return -1;
>      }
>  
> -    if (mis->have_listen_thread) {
> -        error_report("CMD_POSTCOPY_RAM_LISTEN already has a listen thread");
> -        return -1;
> -    }
> -
>      mis->have_listen_thread = true;
>      /* Start up the listening thread and wait for it to signal ready */
>      qemu_sem_init(&mis->listen_thread_sem, 0);
> -- 
> 2.17.1
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


  reply	other threads:[~2019-10-08 18:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-06  0:02 [PATCH 0/3] migration/postcopy: replace have_listen_thread check with PostcopyState check Wei Yang
2019-10-06  0:02 ` [PATCH 1/3] migration/postcopy: mis->have_listen_thread check will never be touched Wei Yang
2019-10-08 18:47   ` Dr. David Alan Gilbert [this message]
2019-10-06  0:02 ` [PATCH 2/3] migration/postcopy: postpone setting PostcopyState to END Wei Yang
2019-10-08 19:06   ` Dr. David Alan Gilbert
2019-10-06  0:02 ` [PATCH 3/3] migration/postcopy: replace have_listen_thread check with PostcopyState check Wei Yang
2019-10-08 19:15   ` Dr. David Alan Gilbert
2019-10-09  1:37     ` Wei Yang
2019-10-09 10:17       ` Dr. David Alan Gilbert
2019-10-10  1:21         ` Wei Yang
2019-10-11 13:58 ` [PATCH 0/3] " Dr. David Alan Gilbert

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=20191008184742.GK3441@work-vm \
    --to=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=richardw.yang@linux.intel.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).