All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] migration: notify migration state before starting thread
Date: Wed, 17 Jul 2013 12:22:33 +0200	[thread overview]
Message-ID: <51E67069.2010502@redhat.com> (raw)
In-Reply-To: <1374053720-28420-3-git-send-email-stefanha@redhat.com>

Il 17/07/2013 11:35, Stefan Hajnoczi ha scritto:
> The migration thread runs outside the QEMU global mutex when possible.
> Therefore we must notify migration state change *before* starting the
> migration thread.
> 
> This allows registered listeners to act before live migration iterations
> begin.  Therefore they can get into a state that allows for live
> migration.  When the migration thread starts everything will be ready.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  migration.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/migration.c b/migration.c
> index 9f5a423..b4daf13 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -625,7 +625,9 @@ void migrate_fd_connect(MigrationState *s)
>      qemu_file_set_rate_limit(s->file,
>                               s->bandwidth_limit / XFER_LIMIT_RATIO);
>  
> +    /* Notify before starting migration thread */
> +    notifier_list_notify(&migration_state_notifiers, s);
> +
>      qemu_thread_create(&s->thread, migration_thread, s,
>                         QEMU_THREAD_JOINABLE);
> -    notifier_list_notify(&migration_state_notifiers, s);
>  }
> 

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

  reply	other threads:[~2013-07-17 10:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17  9:35 [Qemu-devel] [PATCH 0/3] dataplane: virtio-blk live migration with x-data-plane=on Stefan Hajnoczi
2013-07-17  9:35 ` [Qemu-devel] [PATCH 1/3] dataplane: sync virtio.c and vring.c virtqueue state Stefan Hajnoczi
2013-07-17  9:35 ` [Qemu-devel] [PATCH 2/3] migration: notify migration state before starting thread Stefan Hajnoczi
2013-07-17 10:22   ` Paolo Bonzini [this message]
2013-07-17  9:35 ` [Qemu-devel] [PATCH 3/3] dataplane: enable virtio-blk x-data-plane=on live migration Stefan Hajnoczi
2013-07-17 10:26   ` Paolo Bonzini
2013-07-23 13:39     ` Stefan Hajnoczi

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=51E67069.2010502@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.