From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Xu <peterx@redhat.com>,
Eric Blake <eblake@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
"Dr. David Alan Gilbert" <dave@treblig.org>,
Markus Armbruster <armbru@redhat.com>,
Leonardo Bras <leobras@redhat.com>,
qemu-block@nongnu.org, Hailiang Zhang <zhanghailiang@xfusion.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
Zhang Chen <chen.zhang@intel.com>
Subject: [PULL 07/10] migration: drop colo_incoming_thread from MigrationIncomingState
Date: Wed, 10 May 2023 20:09:35 +0200 [thread overview]
Message-ID: <20230510180938.6338-8-quintela@redhat.com> (raw)
In-Reply-To: <20230510180938.6338-1-quintela@redhat.com>
From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
have_colo_incoming_thread variable is unused. colo_incoming_thread can
be local.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20230428194928.1426370-6-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/migration.h | 2 --
migration/migration.c | 7 ++++---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/migration/migration.h b/migration/migration.h
index 3a918514e7..7721c7658b 100644
--- a/migration/migration.h
+++ b/migration/migration.h
@@ -162,8 +162,6 @@ struct MigrationIncomingState {
int state;
- bool have_colo_incoming_thread;
- QemuThread colo_incoming_thread;
/* The coroutine we should enter (back) after failover */
Coroutine *migration_incoming_co;
QemuSemaphore colo_incoming_sem;
diff --git a/migration/migration.c b/migration/migration.c
index 61b316245d..c7f628caa6 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -544,6 +544,8 @@ process_incoming_migration_co(void *opaque)
/* we get COLO info, and know if we are in COLO mode */
if (!ret && migration_incoming_colo_enabled()) {
+ QemuThread colo_incoming_thread;
+
/* Make sure all file formats throw away their mutable metadata */
bdrv_activate_all(&local_err);
if (local_err) {
@@ -551,14 +553,13 @@ process_incoming_migration_co(void *opaque)
goto fail;
}
- qemu_thread_create(&mis->colo_incoming_thread, "COLO incoming",
+ qemu_thread_create(&colo_incoming_thread, "COLO incoming",
colo_process_incoming_thread, mis, QEMU_THREAD_JOINABLE);
- mis->have_colo_incoming_thread = true;
qemu_coroutine_yield();
qemu_mutex_unlock_iothread();
/* Wait checkpoint incoming thread exit before free resource */
- qemu_thread_join(&mis->colo_incoming_thread);
+ qemu_thread_join(&colo_incoming_thread);
qemu_mutex_lock_iothread();
/* We hold the global iothread lock, so it is safe here */
colo_release_ram_cache();
--
2.40.1
next prev parent reply other threads:[~2023-05-10 18:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 18:09 [PULL 00/10] Migration 20230509 patches Juan Quintela
2023-05-10 18:09 ` [PULL 01/10] ram: Add public helper to set colo bitmap Juan Quintela
2023-05-10 18:09 ` [PULL 02/10] ram: Let colo_flush_ram_cache take the bitmap_mutex Juan Quintela
2023-05-10 18:09 ` [PULL 03/10] multifd: Add the ramblock to MultiFDRecvParams Juan Quintela
2023-05-10 18:09 ` [PULL 04/10] block/meson.build: prefer positive condition for replication Juan Quintela
2023-05-10 18:09 ` [PULL 05/10] colo: make colo_checkpoint_notify static and provide simpler API Juan Quintela
2023-05-10 18:09 ` [PULL 06/10] build: move COLO under CONFIG_REPLICATION Juan Quintela
2023-05-10 18:09 ` Juan Quintela [this message]
2023-05-10 18:09 ` [PULL 08/10] migration: process_incoming_migration_co: simplify code flow around ret Juan Quintela
2023-05-10 18:09 ` [PULL 09/10] migration: disallow change capabilities in COLO state Juan Quintela
2023-05-10 18:09 ` [PULL 10/10] migration: block incoming colo when capability is disabled Juan Quintela
2023-05-11 7:58 ` [PULL 00/10] Migration 20230509 patches Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2023-05-09 19:17 Juan Quintela
2023-05-09 19:17 ` [PULL 07/10] migration: drop colo_incoming_thread from MigrationIncomingState Juan Quintela
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=20230510180938.6338-8-quintela@redhat.com \
--to=quintela@redhat.com \
--cc=armbru@redhat.com \
--cc=chen.zhang@intel.com \
--cc=dave@treblig.org \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=leobras@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@yandex-team.ru \
--cc=zhanghailiang@xfusion.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).