[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/5] multifd: Implement yank for multifd send side
From: |
Juan Quintela |
Subject: |
[PULL 1/5] multifd: Implement yank for multifd send side |
Date: |
Tue, 14 Sep 2021 13:51:53 +0200 |
From: Lukas Straub <lukasstraub2@web.de>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Juan Quintela
<quintela@redhat.com>, Peter Xu <peterx@redhat.com>, Leonardo Bras Soares
Passos <lsoaresp@redhat.com>
Date: Wed, 1 Sep 2021 17:58:57 +0200 (1 week, 15 hours, 17 minutes ago)
[[PGP Signed Part:No public key for 35AB0B289C5DB258 created at
2021-09-01T17:58:57+0200 using RSA]]
When introducing yank functionality in the migration code I forgot
to cover the multifd send side.
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Tested-by: Leonardo Bras <leobras@redhat.com>
Reviewed-by: Leonardo Bras <leobras@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/multifd.h | 2 ++
migration/multifd.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/migration/multifd.h b/migration/multifd.h
index 8d6751f5ed..16c4d112d1 100644
--- a/migration/multifd.h
+++ b/migration/multifd.h
@@ -85,6 +85,8 @@ typedef struct {
bool running;
/* should this thread finish */
bool quit;
+ /* is the yank function registered */
+ bool registered_yank;
/* thread has work to do */
int pending_job;
/* array of pages to sent */
diff --git a/migration/multifd.c b/migration/multifd.c
index 377da78f5b..5a4f158f3c 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -546,6 +546,9 @@ void multifd_save_cleanup(void)
MultiFDSendParams *p = &multifd_send_state->params[i];
Error *local_err = NULL;
+ if (p->registered_yank) {
+ migration_ioc_unregister_yank(p->c);
+ }
socket_send_channel_destroy(p->c);
p->c = NULL;
qemu_mutex_destroy(&p->mutex);
@@ -813,7 +816,8 @@ static bool multifd_channel_connect(MultiFDSendParams *p,
return false;
}
} else {
- /* update for tls qio channel */
+ migration_ioc_register_yank(ioc);
+ p->registered_yank = true;
p->c = ioc;
qemu_thread_create(&p->thread, p->name, multifd_send_thread, p,
QEMU_THREAD_JOINABLE);
--
2.31.1
- [PULL 0/5] Migration.next patches, Juan Quintela, 2021/09/14
- [PULL 2/5] multifd: Unconditionally unregister yank function, Juan Quintela, 2021/09/14
- [PULL 1/5] multifd: Implement yank for multifd send side,
Juan Quintela <=
- [PULL 3/5] migration/rdma: Try to register On-Demand Paging memory region, Juan Quintela, 2021/09/14
- [PULL 4/5] migration/rdma: advise prefetch write for ODP region, Juan Quintela, 2021/09/14
- [PULL 5/5] migration/ram: Don't passs RAMState to migration_clear_memory_region_dirty_bitmap_*(), Juan Quintela, 2021/09/14
- Re: [PULL 0/5] Migration.next patches, Peter Maydell, 2021/09/14