multifd: Implement yank for multifd send side
PATCH 1/1 multifd: Implement yank for multifd send side
When introducing yank functionality in the migration code I forgot to cover the multifd send side.
---
@Leonardo Could you check if this fixes your issue?
migration/multifd.c | 6 +++++- migration/multifd.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-)
migration/multifd.c +5 -1
@@ -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 );
migration/multifd.h +2 -0
@@ -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 */
Signature · 1 line
2.32.0
Hello Lukas,
Quoted 8 lines · Lukas Straub
When introducing yank functionality in the migration code I forgot to cover the multifd send side.
Signed-off-by Lukas Straub <[email protected]>---
@Leonardo Could you check if this fixes your issue?
In the same scenario I was testing my previous patch,
(http://patchwork.ozlabs.org/project/qemu-devel/patch/[email protected]/)
this patch also seems to fix the issue .
(https://bugzilla.redhat.com/show_bug.cgi?id=1970337).
Quoted 44 lines
migration/multifd.c | 6 +++++- migration/multifd.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-)migration/multifd.c +5
-1@@ -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 );migration/multifd.h +2
-1@@ -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 */ --2.32.0
Quoted 11 lines · Leonardo Bras Soares Passos
Hello Lukas,
Quoted 7 lines · Lukas Straub
When introducing yank functionality in the migration code I forgot to cover the multifd send side.
Signed-off-by Lukas Straub <[email protected]>---
Quoted 6 lines
Quoted 1 line
@Leonardo Could you check if this fixes your issue?
In the same scenario I was testing my previous patch,
(http://patchwork.ozlabs.org/project/qemu-devel/patch/[email protected]/)
this patch also seems to fix the issue .
(https://bugzilla.redhat.com/show_bug.cgi?id=1970337).
Regarding this single test:
I am by no means a yank or migration expert, but the change seems to make sense based on what I could learn in the above BZ.
So, FWIW:
Although I think it would be great if a more experienced person could also review.
Best regards,
Leonardo Bras
Quoted 46 lines
Quoted 46 lines
migration/multifd.c | 6 +++++- migration/multifd.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-)migration/multifd.c +5
-1@@ -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 );migration/multifd.h +2
-1@@ -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 */ --2.32.0