[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/17] migration/multifd: Stop checking p->quit in multifd_send_th
From: |
Juan Quintela |
Subject: |
[PULL 05/17] migration/multifd: Stop checking p->quit in multifd_send_thread |
Date: |
Fri, 20 Oct 2023 08:57:39 +0200 |
From: Fabiano Rosas <farosas@suse.de>
We don't need to check p->quit in the multifd_send_thread() because it
is shadowed by the 'exiting' flag. Ever since that flag was added
p->quit became obsolete as a way to stop the thread.
Since p->quit is set at multifd_send_terminate_threads() under the
p->mutex lock, the thread will only see it once it loops, so 'exiting'
will always be seen first.
Note that setting p->quit at multifd_send_terminate_threads() still
makes sense because we need a way to inform multifd_send_pages() that
the channel has stopped.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231012140651.13122-3-farosas@suse.de>
---
migration/multifd.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/migration/multifd.c b/migration/multifd.c
index 1fe53d3b98..e2a45c667a 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -743,9 +743,6 @@ static void *multifd_send_thread(void *opaque)
if (flags & MULTIFD_FLAG_SYNC) {
qemu_sem_post(&p->sem_sync);
}
- } else if (p->quit) {
- qemu_mutex_unlock(&p->mutex);
- break;
} else {
qemu_mutex_unlock(&p->mutex);
/* sometimes there are spurious wakeups */
--
2.41.0
- [PULL 00/17] Migration 20231020 patches, Juan Quintela, 2023/10/20
- [PULL 01/17] tests/qtest/migration-test: Disable the analyze-migration.py test on s390x, Juan Quintela, 2023/10/20
- [PULL 02/17] migration: simplify blockers, Juan Quintela, 2023/10/20
- [PULL 03/17] migration: Fix parse_ramblock() on overwritten retvals, Juan Quintela, 2023/10/20
- [PULL 05/17] migration/multifd: Stop checking p->quit in multifd_send_thread,
Juan Quintela <=
- [PULL 06/17] tests/qtest: Allow qtest_qemu_binary to use a custom environment variable, Juan Quintela, 2023/10/20
- [PULL 04/17] migration: simplify notifiers, Juan Quintela, 2023/10/20
- [PULL 07/17] tests/qtest: Introduce qtest_init_with_env, Juan Quintela, 2023/10/20
- [PULL 08/17] tests/qtest: Allow qtest_get_machines to use an alternate QEMU binary, Juan Quintela, 2023/10/20
- [PULL 09/17] tests/qtest: Introduce qtest_has_machine_with_env, Juan Quintela, 2023/10/20
- [PULL 11/17] tests/qtest/migration: Introduce find_common_machine_version, Juan Quintela, 2023/10/20
- [PULL 10/17] tests/qtest: Introduce qtest_resolve_machine_alias, Juan Quintela, 2023/10/20
- [PULL 12/17] tests/qtest/migration: Define a machine for all architectures, Juan Quintela, 2023/10/20
- [PULL 13/17] tests/qtest/migration: Specify the geometry of the bootsector, Juan Quintela, 2023/10/20
- [PULL 16/17] tests/qtest/migration: Allow user to specify a machine type, Juan Quintela, 2023/10/20