[RFC PATCH 04/17] COLO info: use colo info to tell migration target colo is enabled

2014-07-23 Thread Yang Hongyang
migrate colo info to migration target to tell the target colo is enabled. Signed-off-by: Yang Hongyang --- Makefile.objs | 1 + include/migration/migration-colo.h | 3 ++ migration-colo-comm.c | 68 ++ vl.c

[RFC PATCH 06/17] COLO restore: integrate COLO checkpointed restore into qemu restore

2014-07-23 Thread Yang Hongyang
enter colo checkpointed restore loop after live migration. Signed-off-by: Yang Hongyang --- include/migration/migration-colo.h | 6 ++ migration-colo-comm.c | 10 ++ migration-colo.c | 22 ++ migration.c| 3

[RFC PATCH 13/17] COLO ctl: implement colo save

2014-07-23 Thread Yang Hongyang
implement colo save Signed-off-by: Yang Hongyang --- migration-colo.c | 44 ++-- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/migration-colo.c b/migration-colo.c index a708872..03ac157 100644 --- a/migration-colo.c +++ b/migration-colo.c

[RFC PATCH 17/17] HACK: trigger checkpoint every 500ms

2014-07-23 Thread Yang Hongyang
Because COLO Agent is under development. We add this hack for test purpose. Trigger checkpoint every 500ms so that we can test the process of COLO save/restore. NOTE: This is only a hack, and will be removed at last. Signed-off-by: Yang Hongyang --- migration-colo.c | 14 +- 1

[RFC PATCH 11/17] COLO ctl: implement colo checkpoint protocol

2014-07-23 Thread Yang Hongyang
ide may go forward a lot when this side just receives the sync-point. Signed-off-by: Yang Hongyang --- migration-colo.c | 268 +-- 1 file changed, 262 insertions(+), 6 deletions(-) diff --git a/migration-colo.c b/migration-colo.c index 26

[RFC PATCH 14/17] COLO ctl: implement colo restore

2014-07-23 Thread Yang Hongyang
implement colo restore Signed-off-by: Yang Hongyang --- migration-colo.c | 43 +++ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/migration-colo.c b/migration-colo.c index 03ac157..8596845 100644 --- a/migration-colo.c +++ b/migration

[RFC PATCH 08/17] COLO: disable qdev hotplug

2014-07-23 Thread Yang Hongyang
COLO do not support qdev hotplug migration, disable it. Signed-off-by: Yang Hongyang --- migration-colo.c | 12 1 file changed, 12 insertions(+) diff --git a/migration-colo.c b/migration-colo.c index b90d9b6..f295e56 100644 --- a/migration-colo.c +++ b/migration-colo.c @@ -12,6

[RFC PATCH 16/17] COLO ram cache: implement colo ram cache on slaver

2014-07-23 Thread Yang Hongyang
t was both dirty on PVM and SVM since last checkpoint). Signed-off-by: Yang Hongyang --- arch_init.c| 154 - include/exec/cpu-all.h | 1 + include/migration/migration-colo.h | 3 + migration-colo.c | 4

[RFC PATCH 15/17] COLO save: reuse migration bitmap under colo checkpoint

2014-07-23 Thread Yang Hongyang
reuse migration bitmap under colo checkpoint, only send dirty pages per-checkpoint. Signed-off-by: Yang Hongyang --- arch_init.c| 20 +++- include/migration/migration-colo.h | 2 ++ migration-colo.c | 6 ++ stubs/migration-colo.c

[RFC PATCH 03/17] COLO migration: add a migration capability 'colo'

2014-07-23 Thread Yang Hongyang
Add a migration capability 'colo'. If this capability is on, The migration will never end, and the VM will be continuously checkpointed. Signed-off-by: Yang Hongyang --- include/qapi/qmp/qerror.h | 3 +++ migration.c | 6 ++ qapi-schema.json | 5 - 3 fil

[RFC PATCH 02/17] COLO: introduce an api colo_supported() to indicate COLO support

2014-07-23 Thread Yang Hongyang
introduce an api colo_supported() to indicate COLO support, returns true if colo supported(configured with --enable-colo). Signed-off-by: Yang Hongyang --- Makefile.objs | 1 + include/migration/migration-colo.h | 18 ++ migration-colo.c

[RFC PATCH 07/17] COLO buffer: implement colo buffer as well as QEMUFileOps based on it

2014-07-23 Thread Yang Hongyang
side's stat. On restore side: all migration data was read into colo buffer first, then load data from the buffer: If network error happens while data transmission, the slaver can still functinal because the migration data are not yet loaded. Signed-off-by: Yang Hongyang --- migration-colo.c

[RFC PATCH 10/17] COLO ctl: introduce is_slave() and is_master()

2014-07-23 Thread Yang Hongyang
is_slaver is to determine whether the QEMU instance is a slaver(migration target) at runtime. is_master is to determine whether the QEMU instance is a master(migration starter) at runtime. This 2 APIs will be used later. Signed-off-by: Yang Hongyang --- migration-colo.c | 11 +++ 1 file

[RFC PATCH 12/17] COLO ctl: add a RunState RUN_STATE_COLO

2014-07-23 Thread Yang Hongyang
Guest will enter this state when paused to save/resore VM state under colo checkpoint. Signed-off-by: Yang Hongyang --- qapi-schema.json | 4 +++- vl.c | 8 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index 807f5a2

[RFC PATCH 05/17] COLO save: integrate COLO checkpointed save into qemu migration

2014-07-23 Thread Yang Hongyang
Integrate COLO checkpointed save flow into qemu migration. Add a migrate state: MIG_STATE_COLO, enter this migrate state after the first live migration successfully finished. Create a colo thread to do the checkpointed save. Signed-off-by: Yang Hongyang --- include/migration/migration

[RFC PATCH 09/17] COLO ctl: implement API's that communicate with colo agent

2014-07-23 Thread Yang Hongyang
We use COLO agent to compare the packets returned by Primary VM and Secondary VM, and decide whether to start a checkpoint according to some rules. It is a linux kernel module for host. COLO controller communicate with the agent through ioctl(). Signed-off-by: Yang Hongyang --- migration-colo.c

[RFC PATCH 00/17] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service

2014-07-23 Thread Yang Hongyang
two runing VMs, whenever you make changes to PVM, SVM will be synced to PVM's state. TODO list: 1. failover 2. nic replication 3. disk replication[COLO Disk manager] Any comments/feedbacks are warmly welcomed. Thanks, Yang Yang Hongyang (17): configure: add CONFIG_COLO to switch COLO su

[RFC PATCH 01/17] configure: add CONFIG_COLO to switch COLO support

2014-07-23 Thread Yang Hongyang
./configure --enable-colo/--disable-colo to switch COLO support on/off. COLO support is off by default. Signed-off-by: Yang Hongyang --- configure | 14 ++ 1 file changed, 14 insertions(+) diff --git a/configure b/configure index f7685b5..4071943 100755 --- a/configure +++ b