From: Juan Quintela <quintela@redhat.com>
To: "Rao, Lei" <lei.rao@intel.com>
Cc: chen.zhang@intel.com, dgilbert@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH v2] COLO: Move some trace code behind qemu_mutex_unlock_iothread()
Date: Tue, 14 Dec 2021 09:23:51 +0100 [thread overview]
Message-ID: <87czlz7fxk.fsf@secure.mitica> (raw)
In-Reply-To: <20211214171945.217843-1-lei.rao@intel.com> (Lei Rao's message of "Wed, 15 Dec 2021 01:19:45 +0800")
"Rao, Lei" <lei.rao@intel.com> wrote:
> There is no need to put some trace code in the critical section.
> So, moving it behind qemu_mutex_unlock_iothread() can reduce the
> lock time.
>
> Signed-off-by: Lei Rao <lei.rao@intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
queued for 7.0
> ---
> migration/colo.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/migration/colo.c b/migration/colo.c
> index 2415325262..3ccacb29c8 100644
> --- a/migration/colo.c
> +++ b/migration/colo.c
> @@ -683,8 +683,8 @@ static void colo_incoming_process_checkpoint(MigrationIncomingState *mis,
>
> qemu_mutex_lock_iothread();
> vm_stop_force_state(RUN_STATE_COLO);
> - trace_colo_vm_state_change("run", "stop");
> qemu_mutex_unlock_iothread();
> + trace_colo_vm_state_change("run", "stop");
>
> /* FIXME: This is unnecessary for periodic checkpoint mode */
> colo_send_message(mis->to_src_file, COLO_MESSAGE_CHECKPOINT_REPLY,
> @@ -786,8 +786,8 @@ static void colo_incoming_process_checkpoint(MigrationIncomingState *mis,
>
> vmstate_loading = false;
> vm_start();
> - trace_colo_vm_state_change("stop", "run");
> qemu_mutex_unlock_iothread();
> + trace_colo_vm_state_change("stop", "run");
>
> if (failover_get_state() == FAILOVER_STATUS_RELAUNCH) {
> return;
> @@ -870,8 +870,8 @@ void *colo_process_incoming_thread(void *opaque)
> abort();
> #endif
> vm_start();
> - trace_colo_vm_state_change("stop", "run");
> qemu_mutex_unlock_iothread();
> + trace_colo_vm_state_change("stop", "run");
>
> colo_send_message(mis->to_src_file, COLO_MESSAGE_CHECKPOINT_READY,
> &local_err);
prev parent reply other threads:[~2021-12-14 8:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 17:19 [PATCH v2] COLO: Move some trace code behind qemu_mutex_unlock_iothread() Rao, Lei
2021-12-14 8:23 ` Juan Quintela [this message]
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=87czlz7fxk.fsf@secure.mitica \
--to=quintela@redhat.com \
--cc=chen.zhang@intel.com \
--cc=dgilbert@redhat.com \
--cc=lei.rao@intel.com \
--cc=qemu-devel@nongnu.org \
/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).