diff options
author | Peter Xu <peterx@redhat.com> | 2018-05-02 18:47:22 +0800 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2018-05-15 20:24:27 +0200 |
commit | 3a7804c3065ac79ff6e609e75ff2765d79f64f85 (patch) | |
tree | f6e71bb7685a6462714221fe0908132c842122d0 /migration/migration.c | |
parent | 14b1742eaaad1148c5b421eea0ae7e74d823e630 (diff) | |
download | qemu-3a7804c3065ac79ff6e609e75ff2765d79f64f85.zip |
migration: allow fault thread to pause
Allows the fault thread to stop handling page faults temporarily. When
network failure happened (and if we expect a recovery afterwards), we
should not allow the fault thread to continue sending things to source,
instead, it should halt for a while until the connection is rebuilt.
When the dest main thread noticed the failure, it kicks the fault thread
to switch to pause state.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180502104740.12123-7-peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c index f9c58d2511..3d3b0a5b4a 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -160,6 +160,7 @@ MigrationIncomingState *migration_incoming_get_current(void) qemu_mutex_init(&mis_current.rp_mutex); qemu_event_init(&mis_current.main_thread_load_event, false); qemu_sem_init(&mis_current.postcopy_pause_sem_dst, 0); + qemu_sem_init(&mis_current.postcopy_pause_sem_fault, 0); init_dirty_bitmap_incoming_migration(); |