From 3a7804c3065ac79ff6e609e75ff2765d79f64f85 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Wed, 2 May 2018 18:47:22 +0800 Subject: 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 Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-7-peterx@redhat.com> Signed-off-by: Juan Quintela --- migration/savevm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'migration/savevm.c') diff --git a/migration/savevm.c b/migration/savevm.c index 8ad99b1eaa..6ee69d8283 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2083,6 +2083,9 @@ static bool postcopy_pause_incoming(MigrationIncomingState *mis) mis->to_src_file = NULL; qemu_mutex_unlock(&mis->rp_mutex); + /* Notify the fault thread for the invalidated file handle */ + postcopy_fault_thread_notify(mis); + error_report("Detected IO failure for postcopy. " "Migration paused."); -- cgit v1.2.3