diff options
| author | Maciej S. Szmigiero <maciej.szmigiero@oracle.com> | 2025-03-04 23:03:44 +0100 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-03-06 06:47:33 +0100 |
| commit | 8305921a91a940023fe971c74eb1e06f2725ebab (patch) | |
| tree | 930f979fd1b3108465e2ee9f7f239b3460147236 /include/migration/misc.h | |
| parent | a1131aa94256d1007b4267ff9e79c3b4ada6e2b9 (diff) | |
| download | focaccia-qemu-8305921a91a940023fe971c74eb1e06f2725ebab.tar.gz focaccia-qemu-8305921a91a940023fe971c74eb1e06f2725ebab.zip | |
migration: Add save_live_complete_precopy_thread handler
This SaveVMHandler helps device provide its own asynchronous transmission of the remaining data at the end of a precopy phase via multifd channels, in parallel with the transfer done by save_live_complete_precopy handlers. These threads are launched only when multifd device state transfer is supported. Management of these threads in done in the multifd migration code, wrapping them in the generic thread pool. Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/qemu-devel/eac74a4ca7edd8968bbf72aa07b9041c76364a16.1741124640.git.maciej.szmigiero@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/migration/misc.h')
| -rw-r--r-- | include/migration/misc.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/migration/misc.h b/include/migration/misc.h index 273ebfca62..8fd36eba1d 100644 --- a/include/migration/misc.h +++ b/include/migration/misc.h @@ -119,8 +119,25 @@ bool migrate_uri_parse(const char *uri, MigrationChannel **channel, Error **errp); /* migration/multifd-device-state.c */ +typedef struct SaveLiveCompletePrecopyThreadData { + SaveLiveCompletePrecopyThreadHandler hdlr; + char *idstr; + uint32_t instance_id; + void *handler_opaque; +} SaveLiveCompletePrecopyThreadData; + bool multifd_queue_device_state(char *idstr, uint32_t instance_id, char *data, size_t len); bool multifd_device_state_supported(void); +void +multifd_spawn_device_state_save_thread(SaveLiveCompletePrecopyThreadHandler hdlr, + char *idstr, uint32_t instance_id, + void *opaque); + +bool multifd_device_state_save_thread_should_exit(void); + +void multifd_abort_device_state_save_threads(void); +bool multifd_join_device_state_save_threads(void); + #endif |