Skip to content

Commit 20171ea

Browse files
lukasstraub2Juan Quintela
authored andcommitted
multifd: Implement yank for multifd send side
To: qemu-devel <[email protected]> Cc: "Dr. David Alan Gilbert" <[email protected]>, Juan Quintela <[email protected]>, Peter Xu <[email protected]>, Leonardo Bras Soares Passos <[email protected]> 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 <[email protected]> Tested-by: Leonardo Bras <[email protected]> Reviewed-by: Leonardo Bras <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Juan Quintela <[email protected]>
1 parent 362534a commit 20171ea

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

migration/multifd.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,9 @@ void multifd_save_cleanup(void)
546546
MultiFDSendParams *p = &multifd_send_state->params[i];
547547
Error *local_err = NULL;
548548

549+
if (p->registered_yank) {
550+
migration_ioc_unregister_yank(p->c);
551+
}
549552
socket_send_channel_destroy(p->c);
550553
p->c = NULL;
551554
qemu_mutex_destroy(&p->mutex);
@@ -813,7 +816,8 @@ static bool multifd_channel_connect(MultiFDSendParams *p,
813816
return false;
814817
}
815818
} else {
816-
/* update for tls qio channel */
819+
migration_ioc_register_yank(ioc);
820+
p->registered_yank = true;
817821
p->c = ioc;
818822
qemu_thread_create(&p->thread, p->name, multifd_send_thread, p,
819823
QEMU_THREAD_JOINABLE);

migration/multifd.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ typedef struct {
8585
bool running;
8686
/* should this thread finish */
8787
bool quit;
88+
/* is the yank function registered */
89+
bool registered_yank;
8890
/* thread has work to do */
8991
int pending_job;
9092
/* array of pages to sent */

0 commit comments

Comments
 (0)