[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/18] COLO: Move some trace code behind qemu_mutex_unlock_iothrea
From: |
Juan Quintela |
Subject: |
[PULL 16/18] COLO: Move some trace code behind qemu_mutex_unlock_iothread() |
Date: |
Wed, 15 Dec 2021 11:32:16 +0100 |
From: "Rao, Lei" <lei.rao@intel.com>
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>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/colo.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/migration/colo.c b/migration/colo.c
index 4a772afe78..5f7071b3cd 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -680,8 +680,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,
@@ -783,8 +783,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;
@@ -887,8 +887,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);
--
2.33.1
- [PULL 02/18] migration/colo: More accurate update checkpoint time, (continued)
- [PULL 02/18] migration/colo: More accurate update checkpoint time, Juan Quintela, 2021/12/15
- [PULL 11/18] multifd: The variable is only used inside the loop, Juan Quintela, 2021/12/15
- [PULL 09/18] multifd: Rename used field to num, Juan Quintela, 2021/12/15
- [PULL 07/18] multifd: Delete useless operation, Juan Quintela, 2021/12/15
- [PULL 12/18] multifd: remove used parameter from send_prepare() method, Juan Quintela, 2021/12/15
- [PULL 10/18] multifd: Add missing documention, Juan Quintela, 2021/12/15
- [PULL 13/18] multifd: remove used parameter from send_recv_pages() method, Juan Quintela, 2021/12/15
- [PULL 14/18] multifd: Fill offset and block for reception, Juan Quintela, 2021/12/15
- [PULL 15/18] multifd: Shut down the QIO channels to avoid blocking the send threads when they are terminated., Juan Quintela, 2021/12/15
- [PULL 17/18] multifd: Make zstd compression method not use iovs, Juan Quintela, 2021/12/15
- [PULL 16/18] COLO: Move some trace code behind qemu_mutex_unlock_iothread(),
Juan Quintela <=
- [PULL 18/18] multifd: Make zlib compression method not use iovs, Juan Quintela, 2021/12/15
- Re: [PULL 00/18] Migration 20211214 patches, Richard Henderson, 2021/12/15