diff options
| author | Maciej S. Szmigiero <maciej.szmigiero@oracle.com> | 2025-03-04 23:03:36 +0100 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-03-06 06:47:33 +0100 |
| commit | b1937fd1eb8360d0dc0abb0a8da221d8edce3733 (patch) | |
| tree | 743f2575705e15fa3bee4b21e8b123f41dae99f7 /migration/migration.h | |
| parent | 18eb55546a54e443d94a4c49286348176ad4b00a (diff) | |
| download | focaccia-qemu-b1937fd1eb8360d0dc0abb0a8da221d8edce3733.tar.gz focaccia-qemu-b1937fd1eb8360d0dc0abb0a8da221d8edce3733.zip | |
migration: Add thread pool of optional load threads
Some drivers might want to make use of auxiliary helper threads during VM state loading, for example to make sure that their blocking (sync) I/O operations don't block the rest of the migration process. Add a migration core managed thread pool to facilitate this use case. The migration core will wait for these threads to finish before (re)starting the VM at destination. Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Link: https://lore.kernel.org/qemu-devel/b09fd70369b6159c75847e69f235cb908b02570c.1741124640.git.maciej.szmigiero@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'migration/migration.h')
| -rw-r--r-- | migration/migration.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/migration/migration.h b/migration/migration.h index 7b4278e2a3..d53f7cad84 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -43,6 +43,7 @@ #define MIGRATION_THREAD_DST_PREEMPT "mig/dst/preempt" struct PostcopyBlocktimeContext; +typedef struct ThreadPool ThreadPool; #define MIGRATION_RESUME_ACK_VALUE (1) @@ -187,6 +188,10 @@ struct MigrationIncomingState { Coroutine *colo_incoming_co; QemuSemaphore colo_incoming_sem; + /* Optional load threads pool and its thread exit request flag */ + ThreadPool *load_threads; + bool load_threads_abort; + /* * PostcopyBlocktimeContext to keep information for postcopy * live migration, to calculate vCPU block time |