mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-21 17:11:57 -06:00
migration/multifd: Stop checking p->quit in multifd_send_thread
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>
This commit is contained in:
parent
d9cda21303
commit
175e63c982
1 changed files with 0 additions and 3 deletions
|
@ -743,9 +743,6 @@ static void *multifd_send_thread(void *opaque)
|
||||||
if (flags & MULTIFD_FLAG_SYNC) {
|
if (flags & MULTIFD_FLAG_SYNC) {
|
||||||
qemu_sem_post(&p->sem_sync);
|
qemu_sem_post(&p->sem_sync);
|
||||||
}
|
}
|
||||||
} else if (p->quit) {
|
|
||||||
qemu_mutex_unlock(&p->mutex);
|
|
||||||
break;
|
|
||||||
} else {
|
} else {
|
||||||
qemu_mutex_unlock(&p->mutex);
|
qemu_mutex_unlock(&p->mutex);
|
||||||
/* sometimes there are spurious wakeups */
|
/* sometimes there are spurious wakeups */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue