Migration bits from the COLO project
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQItBAABCAAXBQJYFc37EBxhbWl0QGtlcm5lbC5vcmcACgkQ6wtN/GV+9nDdqQ/9 H+di+q/zF6aOEuXRCN0ud9R81fZ7nLve3e9EbKCNZXnxN3M3+zQj0At+e/SBEoTc rRwqJmNlRX3TWViWsAYmddgtopZ9R9DWwW/VsKjS2Ng230YShrA/o20hu2dJkwl3 CN4vAObzc/gxM59NWUlMnTXOG+Z9fI1NlEf0vZ2484a59KPVIE7W1zZccT1F8MNq sfa3RlOGBchNO2Rfzrr6cFGGH7UTfWiftPs7EDOfN/YBcpld6V4DfPWdPP8r2DSX gG7D3DJuuqPxZCjl0Nm1OjaIunYfVrRpMPMeNyo1+kTVbvvhDPFjah/MSWu8XJ2c N5lSqikIAWfMbQVW9gDpQ0495eRQTWA7VIlCbwN6mqNxyBvQMA+licFq6UFFrCMp quC3gO+daz3fKvUhi23TpebbqKLHA5OZA5ZvkjGDgkKPMCJyQRBZHLb81t5xsulZ cXuzAOeRcXK9aEJvcrDgWwxzi3PN8zg74RF1ZV8gxM4DkHKohlsnbgshWqGkFh3M +S5tEPqVlOlDO9juf6rlwNnVbWhFDFEGMKjI9XMTWwVWTREbqyP86fP66h2C4qc6 34yAHi5G2i43dxzHgpHC0MpU0XenO0EYdu+8Tcx35LSBSfkOeD7pU1DeZQgbI51m ZQSnLDJqv2HVdoZT7vaIjwuhtEl84xqelFdVg+cY7Gw= =sur7 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.8' into staging Migration bits from the COLO project # gpg: Signature made Sun 30 Oct 2016 10:39:55 GMT # gpg: using RSA key 0xEB0B4DFC657EF670 # gpg: Good signature from "Amit Shah <amit@amitshah.net>" # gpg: aka "Amit Shah <amit@kernel.org>" # gpg: aka "Amit Shah <amitshah@gmx.net>" # Primary key fingerprint: 48CA 3722 5FE7 F4A8 B337 2735 1E9A 3B5F 8540 83B6 # Subkey fingerprint: CC63 D332 AB8F 4617 4529 6534 EB0B 4DFC 657E F670 * remotes/amit-migration/tags/migration-for-2.8: MAINTAINERS: Add maintainer for COLO framework related files configure: Support enable/disable COLO feature docs: Add documentation for COLO feature COLO: Implement failover work for secondary VM COLO: Implement the process of failover for primary VM COLO: Introduce state to record failover process COLO: Add 'x-colo-lost-heartbeat' command to trigger failover COLO: Synchronize PVM's state to SVM periodically COLO: Add checkpoint-delay parameter for migrate-set-parameters COLO: Load VMState into QIOChannelBuffer before restore it COLO: Send PVM state to secondary side when do checkpoint COLO: Add a new RunState RUN_STATE_COLO COLO: Introduce checkpointing protocol COLO: Establish a new communicating path for COLO migration: Switch to COLO process after finishing loadvm migration: Enter into COLO mode after migration if COLO is enabled COLO: migrate COLO related info to secondary node migration: Introduce capability 'x-colo' to migration Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
eab9e9629c
21 changed files with 1279 additions and 21 deletions
38
include/migration/colo.h
Normal file
38
include/migration/colo.h
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO)
|
||||
* (a.k.a. Fault Tolerance or Continuous Replication)
|
||||
*
|
||||
* Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
|
||||
* Copyright (c) 2016 FUJITSU LIMITED
|
||||
* Copyright (c) 2016 Intel Corporation
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or
|
||||
* later. See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#ifndef QEMU_COLO_H
|
||||
#define QEMU_COLO_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "migration/migration.h"
|
||||
#include "qemu/coroutine_int.h"
|
||||
#include "qemu/thread.h"
|
||||
#include "qemu/main-loop.h"
|
||||
|
||||
bool colo_supported(void);
|
||||
void colo_info_init(void);
|
||||
|
||||
void migrate_start_colo_process(MigrationState *s);
|
||||
bool migration_in_colo_state(void);
|
||||
|
||||
/* loadvm */
|
||||
bool migration_incoming_enable_colo(void);
|
||||
void migration_incoming_exit_colo(void);
|
||||
void *colo_process_incoming_thread(void *opaque);
|
||||
bool migration_incoming_in_colo_state(void);
|
||||
|
||||
COLOMode get_colo_mode(void);
|
||||
|
||||
/* failover */
|
||||
void colo_do_failover(MigrationState *s);
|
||||
#endif
|
||||
26
include/migration/failover.h
Normal file
26
include/migration/failover.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO)
|
||||
* (a.k.a. Fault Tolerance or Continuous Replication)
|
||||
*
|
||||
* Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD.
|
||||
* Copyright (c) 2016 FUJITSU LIMITED
|
||||
* Copyright (c) 2016 Intel Corporation
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or
|
||||
* later. See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#ifndef QEMU_FAILOVER_H
|
||||
#define QEMU_FAILOVER_H
|
||||
|
||||
#include "qemu-common.h"
|
||||
#include "qapi-types.h"
|
||||
|
||||
void failover_init_state(void);
|
||||
FailoverStatus failover_set_state(FailoverStatus old_state,
|
||||
FailoverStatus new_state);
|
||||
FailoverStatus failover_get_state(void);
|
||||
void failover_request_active(Error **errp);
|
||||
bool failover_request_is_active(void);
|
||||
|
||||
#endif
|
||||
|
|
@ -21,6 +21,7 @@
|
|||
#include "migration/vmstate.h"
|
||||
#include "qapi-types.h"
|
||||
#include "exec/cpu-common.h"
|
||||
#include "qemu/coroutine_int.h"
|
||||
|
||||
#define QEMU_VM_FILE_MAGIC 0x5145564d
|
||||
#define QEMU_VM_FILE_VERSION_COMPAT 0x00000002
|
||||
|
|
@ -107,6 +108,12 @@ struct MigrationIncomingState {
|
|||
QEMUBH *bh;
|
||||
|
||||
int state;
|
||||
|
||||
bool have_colo_incoming_thread;
|
||||
QemuThread colo_incoming_thread;
|
||||
/* The coroutine we should enter (back) after failover */
|
||||
Coroutine *migration_incoming_co;
|
||||
|
||||
/* See savevm.c */
|
||||
LoadStateEntry_Head loadvm_handlers;
|
||||
};
|
||||
|
|
@ -298,6 +305,7 @@ int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen);
|
|||
|
||||
int migrate_use_xbzrle(void);
|
||||
int64_t migrate_xbzrle_cache_size(void);
|
||||
bool migrate_colo_enabled(void);
|
||||
|
||||
int64_t xbzrle_cache_resize(int64_t new_size);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue