[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v1: 12/12] mc: activate and use MC core logic if
From: |
mrhines |
Subject: |
[Qemu-devel] [RFC PATCH v1: 12/12] mc: activate and use MC core logic if requested |
Date: |
Mon, 21 Oct 2013 01:14:22 +0000 |
From: "Michael R. Hines" <address@hidden>
Building on the previous patches, this finally actually
activates protection of the VM by kicking off an MC thread
after the initial live migration completes. The live migration
thread will get destroyed and the MC thread will run and never die.
Signed-off-by: Michael R. Hines <address@hidden>
---
migration.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/migration.c b/migration.c
index 8e0827e..15ad264 100644
--- a/migration.c
+++ b/migration.c
@@ -94,6 +94,9 @@ static void process_incoming_migration_co(void *opaque)
int ret;
ret = qemu_loadvm_state(f);
+ if (ret >= 0) {
+ mc_process_incoming_checkpoints_if_requested(f);
+ }
qemu_fclose(f);
if (ret < 0) {
fprintf(stderr, "load of migration failed\n");
@@ -670,11 +673,27 @@ static void *migration_thread(void *opaque)
s->downtime = end_time - start_time;
runstate_set(RUN_STATE_POSTMIGRATE);
} else {
+ if(migrate_use_mc()) {
+ qemu_fflush(s->file);
+ if (migrate_use_mc_net()) {
+ if (mc_enable_buffering() < 0 ||
+ mc_start_buffer() < 0) {
+ migrate_set_state(s, MIG_STATE_ACTIVE, MIG_STATE_ERROR);
+ }
+ }
+ }
+
if (old_vm_running) {
vm_start();
}
}
- qemu_bh_schedule(s->cleanup_bh);
+
+ if (migrate_use_mc() && s->state != MIG_STATE_ERROR) {
+ mc_init_checkpointer(s);
+ } else {
+ qemu_bh_schedule(s->cleanup_bh);
+ }
+
qemu_mutex_unlock_iothread();
return NULL;
--
1.8.1.2
- [Qemu-devel] [RFC PATCH v1: 03/12] migration: introduce parallelization of migration_bitmap, (continued)
- [Qemu-devel] [RFC PATCH v1: 03/12] migration: introduce parallelization of migration_bitmap, mrhines, 2013/10/20
- [Qemu-devel] [RFC PATCH v1: 04/12] mc: introduce a "checkpointing" status check into the VCPU states, mrhines, 2013/10/20
- [Qemu-devel] [RFC PATCH v1: 05/12] migration: support custom page loading, mrhines, 2013/10/20
- [Qemu-devel] [RFC PATCH v1: 06/12] rdma: accelerated memcpy() support, mrhines, 2013/10/20
- [Qemu-devel] [RFC PATCH v1: 07/12] mc: introduce state machine error handling and migration_bitmap prep, mrhines, 2013/10/20
- [Qemu-devel] [RFC PATCH v1: 08/12] mc: modified QMP statistics and migration_thread handoff, mrhines, 2013/10/20
- [Qemu-devel] [RFC PATCH v1: 09/12] mc: core logic, mrhines, 2013/10/20
- [Qemu-devel] [RFC PATCH v1: 10/12] mc: configure and makefile support, mrhines, 2013/10/20
- [Qemu-devel] [RFC PATCH v1: 11/12] mc: register MC qemu-file functions and expose MC tunable capability, mrhines, 2013/10/20
- [Qemu-devel] [RFC PATCH v1: 12/12] mc: activate and use MC core logic if requested,
mrhines <=