summaryrefslogtreecommitdiffstats
path: root/migration/qemu-file.h
diff options
context:
space:
mode:
authorPeter Xu2022-07-07 20:55:06 +0200
committerDr. David Alan Gilbert2022-07-20 13:15:08 +0200
commit60bb3c5871a7f7b7cfff5d0a30a035e30cce8e42 (patch)
treece2a2d6915b9ddb44bd1c2a976fa6e57f1a091bb /migration/qemu-file.h
parentmigration: Postcopy preemption enablement (diff)
downloadqemu-60bb3c5871a7f7b7cfff5d0a30a035e30cce8e42.tar.gz
qemu-60bb3c5871a7f7b7cfff5d0a30a035e30cce8e42.tar.xz
qemu-60bb3c5871a7f7b7cfff5d0a30a035e30cce8e42.zip
migration: Postcopy recover with preempt enabled
To allow postcopy recovery, the ram fast load (preempt-only) dest QEMU thread needs similar handling on fault tolerance. When ram_load_postcopy() fails, instead of stopping the thread it halts with a semaphore, preparing to be kicked again when recovery is detected. A mutex is introduced to make sure there's no concurrent operation upon the socket. To make it simple, the fast ram load thread will take the mutex during its whole procedure, and only release it if it's paused. The fast-path socket will be properly released by the main loading thread safely when there's network failures during postcopy with that mutex held. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20220707185506.27257-1-peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/qemu-file.h')
-rw-r--r--migration/qemu-file.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/qemu-file.h b/migration/qemu-file.h
index 96e72d8bd8..fa13d04d78 100644
--- a/migration/qemu-file.h
+++ b/migration/qemu-file.h
@@ -141,6 +141,7 @@ void qemu_file_acct_rate_limit(QEMUFile *f, int64_t len);
void qemu_file_set_rate_limit(QEMUFile *f, int64_t new_rate);
int64_t qemu_file_get_rate_limit(QEMUFile *f);
int qemu_file_get_error_obj(QEMUFile *f, Error **errp);
+int qemu_file_get_error_obj_any(QEMUFile *f1, QEMUFile *f2, Error **errp);
void qemu_file_set_error_obj(QEMUFile *f, int ret, Error *err);
void qemu_file_set_error(QEMUFile *f, int ret);
int qemu_file_shutdown(QEMUFile *f);