xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [RFC Patch v2 00/45] COarse-grain LOck-stepping Virtual Machines for Non-stop Service
@ 2014-08-08  7:00 Wen Congyang
  2014-08-08  7:01 ` [RFC Patch v2 01/45] copy the correct page to memory Wen Congyang
                   ` (46 more replies)
  0 siblings, 47 replies; 64+ messages in thread
From: Wen Congyang @ 2014-08-08  7:00 UTC (permalink / raw)
  To: xen devel
  Cc: Ian Campbell, Wen Congyang, Ian Jackson, Jiang Yunhong,
	Dong Eddie, Yang Hongyang, Lai Jiangshan

Virtual machine (VM) replication is a well known technique for providing
application-agnostic software-implemented hardware fault tolerance -
"non-stop service". Currently, remus provides this function, but it buffers
all output packets, and the latency is unacceptable.

In xen summit 2012, We introduce a new VM replication solution: colo
(COarse-grain LOck-stepping virtual machine). The presentation is in
the following URL:
http://www.slideshare.net/xen_com_mgr/colo-coarsegrain-lockstepping-virtual-machines-for-nonstop-service

Here is the summary of the solution:
>From the client's point of view, as long as the client observes identical
responses from the primary and secondary VMs, according to the service
semantics, then the secondary vm is a valid replica of the primary
vm, and can successfully take over when a hardware failure of the
primary vm is detected.

This patchset is RFC, and implements the framework and disk replication of COLO:
1. Both primary vm and secondary vm are running
2. do checkoint
3. disk replication(use blktap2)

This patchset is based on remus-v18, and use migration v1. Only supports hvm
guest now.

TODO list:
1. Use migration v2 to implement COLO
3. nic replication
4. support pvm

Patch 1-3  : bugfix
Patch 4-11 : update some APIs which will be used by colo
Patch 12-15: temporarily update remus to reuse remus device codes
Patch 16-23: COLO framework related codes
Patch 24   : Hack patch, just for test
Patch 25-34: bugfix for blktap2
Patch 35-38: move some block-remus's codes to block-replication.c. These codes will
             be reused by COLO.
Patch 39   : implement block-colo
Patch 40-43: update libxl to support blktap2
Patch 44   : implement disk replication
Patch 45   : hypervisor bugfix. We find this bug before rebasing colo to newest xen.
             But we don't trigger this bug now.
Patch 46   : A patch for qemu-xen

Changlog from v1 to v2:
1. rebase to newest remus
2. add disk replication support

Hong Tao (1):
  copy the correct page to memory

Lai Jiangshan (1):
  colo: dynamic allocate aio_requests to avoid -EBUSY error

Wen Congyang (43):
  csum the correct page
  don't zero out ioreq page
  Refactor domain_suspend_callback_common()
  Update libxl__domain_resume() for colo
  Update libxl__domain_suspend_common_switch_qemu_logdirty() for colo
  Introduce a new internal API libxl__domain_unpause()
  Update libxl__domain_unpause() to support qemu-xen
  support to resume uncooperative HVM guests
  update datecopier to support sending data only
  introduce a new API to aync read data from fd
  move remus related codes to libxl_remus.c
  rename remus device to checkpoint device
  adjust the indentation
  don't touch remus in checkpoint_device
  Update libxl_save_msgs_gen.pl to support return data from xl to xc
  Allow slave sends data to master
  secondary vm suspend/resume/checkpoint code
  primary vm suspend/get_dirty_pfn/resume/checkpoint code
  xc_domain_save: flush cache before calling callbacks->postcopy() in
    colo mode
  COLO: xc related codes
  send store mfn and console mfn to xl before resuming secondary vm
  implement the cmdline for COLO
  HACK: do checkpoint per 20ms
  fix memory leak in block-remus
  pass uuid to the callback td_open
  return the correct dev path
  blktap2: use correct way to get remus_image
  don't call client_flush() when switching to unprotected mode
  remus: fix bug in tdremus_close()
  blktap2: use correct way to get free event id
  blktap2: don't return negative event id
  blktap2: use correct way to define array.
  blktap2: connect to backup asynchronously
  switch to unprotected mode before closing
  blktap2: move async connect related codes to block-replication.c
  blktap2: move ramdisk related codes to block-replication.c
  block-colo: implement colo disk replication
  pass correct file to qemu if we use blktap2
  support blktap remus in xl
  support blktap colo in xl:
  update libxl__device_disk_from_xs_be() to support blktap device
  libxl/colo: setup and control disk replication for blktap2 backends
  x86/hvm: Always set pending event injection when loading VMC[BS]
    state.

 docs/man/xl.pod.1                                  |   11 +-
 tools/blktap2/drivers/Makefile                     |    5 +-
 tools/blktap2/drivers/block-aio.c                  |   41 +-
 tools/blktap2/drivers/block-cache.c                |    4 +-
 tools/blktap2/drivers/block-colo.c                 | 1151 ++++++++++++++++++
 tools/blktap2/drivers/block-log.c                  |    4 +-
 tools/blktap2/drivers/block-qcow.c                 |    5 +-
 tools/blktap2/drivers/block-ram.c                  |    5 +-
 tools/blktap2/drivers/block-remus.c                | 1266 +++++---------------
 tools/blktap2/drivers/block-replication.c          | 1116 +++++++++++++++++
 tools/blktap2/drivers/block-replication.h          |  217 ++++
 tools/blktap2/drivers/block-vhd.c                  |    5 +-
 tools/blktap2/drivers/scheduler.c                  |   33 +-
 tools/blktap2/drivers/tapdisk-control.c            |   17 +-
 tools/blktap2/drivers/tapdisk-disktype.c           |   21 +-
 tools/blktap2/drivers/tapdisk-disktype.h           |    3 +-
 tools/blktap2/drivers/tapdisk-interface.c          |   21 +-
 tools/blktap2/drivers/tapdisk-interface.h          |    1 +
 tools/blktap2/drivers/tapdisk-vbd.c                |    9 +
 tools/blktap2/drivers/tapdisk-vbd.h                |    1 +
 tools/blktap2/drivers/tapdisk.h                    |    3 +-
 tools/libxc/xc_domain_restore.c                    |   74 +-
 tools/libxc/xc_domain_save.c                       |   66 +-
 tools/libxc/xc_resume.c                            |   20 +-
 tools/libxc/xenguest.h                             |   40 +
 tools/libxl/Makefile                               |    5 +-
 tools/libxl/libxl.c                                |  148 ++-
 tools/libxl/libxl.h                                |    3 +-
 tools/libxl/libxl_aoutils.c                        |   81 +-
 tools/libxl/libxl_blktap2.c                        |   35 +
 ...xl_remus_device.c => libxl_checkpoint_device.c} |  221 ++--
 tools/libxl/libxl_colo.h                           |   48 +
 tools/libxl/libxl_colo_restore.c                   |  878 ++++++++++++++
 tools/libxl/libxl_colo_save.c                      |  628 ++++++++++
 tools/libxl/libxl_colo_save_disk_blktap2.c         |  216 ++++
 tools/libxl/libxl_create.c                         |  138 ++-
 tools/libxl/libxl_device.c                         |    6 +-
 tools/libxl/libxl_dm.c                             |   20 +-
 tools/libxl/libxl_dom.c                            |  565 ++++-----
 tools/libxl/libxl_internal.h                       |  309 +++--
 tools/libxl/libxl_netbuffer.c                      |  127 +-
 tools/libxl/libxl_noblktap2.c                      |   35 +
 tools/libxl/libxl_nonetbuffer.c                    |   14 +-
 tools/libxl/libxl_qmp.c                            |   10 +
 tools/libxl/libxl_remus.c                          |  335 ++++++
 tools/libxl/libxl_remus.h                          |   27 +
 tools/libxl/libxl_remus_disk_drbd.c                |   67 +-
 tools/libxl/libxl_save_callout.c                   |   37 +-
 tools/libxl/libxl_save_helper.c                    |   17 +
 tools/libxl/libxl_save_msgs_gen.pl                 |   74 +-
 tools/libxl/libxl_types.idl                        |   14 +-
 tools/libxl/libxl_utils.c                          |   23 +
 tools/libxl/libxl_utils.h                          |    1 +
 tools/libxl/libxlu_disk_l.l                        |    2 +
 tools/libxl/xl_cmdimpl.c                           |   54 +-
 tools/libxl/xl_cmdtable.c                          |    3 +-
 xen/arch/x86/hvm/svm/svm.c                         |   16 +-
 xen/arch/x86/hvm/vmx/vmx.c                         |   25 +-
 58 files changed, 6558 insertions(+), 1763 deletions(-)
 create mode 100644 tools/blktap2/drivers/block-colo.c
 create mode 100644 tools/blktap2/drivers/block-replication.c
 create mode 100644 tools/blktap2/drivers/block-replication.h
 rename tools/libxl/{libxl_remus_device.c => libxl_checkpoint_device.c} (41%)
 create mode 100644 tools/libxl/libxl_colo.h
 create mode 100644 tools/libxl/libxl_colo_restore.c
 create mode 100644 tools/libxl/libxl_colo_save.c
 create mode 100644 tools/libxl/libxl_colo_save_disk_blktap2.c
 create mode 100644 tools/libxl/libxl_remus.c
 create mode 100644 tools/libxl/libxl_remus.h

-- 
1.9.3

^ permalink raw reply	[flat|nested] 64+ messages in thread

end of thread, other threads:[~2014-08-29  5:59 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08  7:00 [RFC Patch v2 00/45] COarse-grain LOck-stepping Virtual Machines for Non-stop Service Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 01/45] copy the correct page to memory Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 02/45] csum the correct page Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 03/45] don't zero out ioreq page Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 04/45] Refactor domain_suspend_callback_common() Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 05/45] Update libxl__domain_resume() for colo Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 06/45] Update libxl__domain_suspend_common_switch_qemu_logdirty() " Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 07/45] Introduce a new internal API libxl__domain_unpause() Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 08/45] Update libxl__domain_unpause() to support qemu-xen Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 09/45] support to resume uncooperative HVM guests Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 10/45] update datecopier to support sending data only Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 11/45] introduce a new API to aync read data from fd Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 12/45] move remus related codes to libxl_remus.c Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 13/45] rename remus device to checkpoint device Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 14/45] adjust the indentation Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 15/45] don't touch remus in checkpoint_device Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 16/45] Update libxl_save_msgs_gen.pl to support return data from xl to xc Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 17/45] Allow slave sends data to master Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 18/45] secondary vm suspend/resume/checkpoint code Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 19/45] primary vm suspend/get_dirty_pfn/resume/checkpoint code Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 20/45] xc_domain_save: flush cache before calling callbacks->postcopy() in colo mode Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 21/45] COLO: xc related codes Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 22/45] send store mfn and console mfn to xl before resuming secondary vm Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 23/45] implement the cmdline for COLO Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 24/45] HACK: do checkpoint per 20ms Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 25/45] colo: dynamic allocate aio_requests to avoid -EBUSY error Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 26/45] fix memory leak in block-remus Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 27/45] pass uuid to the callback td_open Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 28/45] return the correct dev path Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 29/45] blktap2: use correct way to get remus_image Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 30/45] don't call client_flush() when switching to unprotected mode Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 31/45] remus: fix bug in tdremus_close() Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 32/45] blktap2: use correct way to get free event id Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 33/45] blktap2: don't return negative " Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 34/45] blktap2: use correct way to define array Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 35/45] blktap2: connect to backup asynchronously Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 36/45] switch to unprotected mode before closing Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 37/45] blktap2: move async connect related codes to block-replication.c Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 38/45] blktap2: move ramdisk " Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 39/45] block-colo: implement colo disk replication Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 40/45] pass correct file to qemu if we use blktap2 Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 41/45] support blktap remus in xl Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 42/45] support blktap colo in xl: Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 43/45] update libxl__device_disk_from_xs_be() to support blktap device Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 44/45] libxl/colo: setup and control disk replication for blktap2 backends Wen Congyang
2014-08-08  7:01 ` [RFC Patch v2 45/45] x86/hvm: Always set pending event injection when loading VMC[BS] state Wen Congyang
2014-08-08  7:24   ` Jan Beulich
2014-08-08  7:29     ` Wen Congyang
2014-08-26 16:02   ` Jan Beulich
2014-08-27  0:46     ` Wen Congyang
2014-08-27 14:58       ` Aravind Gopalakrishnan
2014-08-28  1:04         ` Wen Congyang
2014-08-28  8:54           ` Andrew Cooper
2014-08-28 11:17             ` Wen Congyang
2014-08-28 11:31               ` Paul Durrant
2014-08-29  5:59                 ` Wen Congyang
2014-08-28  9:53         ` Tim Deegan
2014-08-27 23:24     ` Tian, Kevin
2014-08-27 15:02   ` Andrew Cooper
2014-08-08  7:01 ` [RFC Patch v2 46/45] Introduce "xen-load-devices-state" Wen Congyang
2014-08-08  7:19 ` [RFC Patch v2 00/45] COarse-grain LOck-stepping Virtual Machines for Non-stop Service Jan Beulich
2014-08-08  7:39   ` Wen Congyang
2014-08-08  8:21   ` Wen Congyang
2014-08-08  9:02     ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).