All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 00/13] Kemari: VM synchronization mechanism for fault tolerance
@ 2009-03-06  5:47 Yoshiaki Tamura
  2009-03-06  5:50 ` [RFC][PATCH 01/13] Kemari: add ECS_TAP state to event channel Yoshiaki Tamura
                   ` (12 more replies)
  0 siblings, 13 replies; 30+ messages in thread
From: Yoshiaki Tamura @ 2009-03-06  5:47 UTC (permalink / raw)
  To: xen-devel; +Cc: ospk-vm, Ian Pratt, ian.jackson, Keir Fraser

Hi,

This patch series implements Kemari, an open-source virtual machine
synchronization mechanism for fault tolerance.  It offers a feasible approach
to fault tolerance that does not require the use of specific hardware or
modification of applications/OS.  Kemari aims to keep VMs transparently running
in times of hardware failures.  It transfers the state of the primary VM to the
secondary VM when the primary VM is about to send an event to devices such as
storage and networks.  Kemari is applicable to 32bit HVM with PV Drivers.  For
more information, please visit http://www.osrg.net/kemari/

Overview:

Kemari in VMM taps event channel, pauses the guest (not suspend), prepares for
transfer, and Kemari in userland transfers the guest.  On failover, Kemari on
the secondary restores the guest, and the backend drivers in dom0 set up the
backend rings from the state of the shared rings in the guest.

[01] xen: add ECS_TAP state to event channel
[02] xen: core Kemari code
[03] xend: change parameter type of xc_{set,get}_hvm_param
[04] xend: Kemari controller interface in libxc
[05] xend: Kemari sender in libxc
[06] xend: Kemari receiver libxc
[07] xend: add Kemari support to python
[08] xend: add dev state "Attached" to python
[09] linux: add XenbusStateAttached to xenbus
[10] linux: XenbusStateAttached handler for blkback
[11] linux: XenbusStateAttached handler for netback
[12] ioemu: use signal to save qemu state for Kemari
[13] ioemu: use shared region with to flip logdirty_bitmap

The patches can be applied to

xen, xend: xen-3.3-testing.hg c/s 18430:19201eebab16 linux: linux-2.6.18-xen.hg
c/s 707:e410857fd83c ioemu: qemu-xen-3.3-testing.git c/s
d489fcbef71a527076a0f9ab56a71d7a7846d5b3:

We'll also keep working to update the patches to the latest trees.
Could you please review the code? Any comments are appreciated.

Thanks,

Yoshi

^ permalink raw reply	[flat|nested] 30+ messages in thread
* [RFC][PATCH 12/13] Kemari: use signal to save qemu state for Kemari
@ 2009-03-12  1:22 Yoshiaki Tamura
  2009-03-24  6:59 ` Yoshiaki Tamura
  0 siblings, 1 reply; 30+ messages in thread
From: Yoshiaki Tamura @ 2009-03-12  1:22 UTC (permalink / raw)
  To: xen-devel
  Cc: "柳澤佳里(yanagisawa yoshisato)",
	Ian Pratt, ian.jackson, Keir Fraser, Stefano Stabellini

References: <49B86208.2020205@lab.ntt.co.jp>
In-Reply-To: <49B86208.2020205@lab.ntt.co.jp>
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit

This is an updated version of the following patch.  Followed the
changes in saving qemu state code.

http://lists.xensource.com/archives/html/xen-devel/2009-03/msg00381.html

Signed-off-by: Yoshisato Yanagisawa <yanagisawa.yoshisato@lab.ntt.co.jp>
Signed-off-by: Yoshi Tamura <tamura.yoshiaki@lab.ntt.co.jp>
---
 vl.c              |   24 ++++++++++++++++++++++++
 xen-config-host.h |    1 +
 2 files changed, 25 insertions(+)

diff --git a/vl.c b/vl.c
index 8539f6d..58875d9 100644
--- a/vl.c
+++ b/vl.c
@@ -274,6 +274,8 @@ static int icount_time_shift;
 static int64_t qemu_icount_bias;
 static QEMUTimer *icount_rt_timer;
 static QEMUTimer *icount_vm_timer;
+/* Kemari */
+volatile int kemari_enabled = 0;

 uint8_t qemu_uuid[16];

@@ -6961,6 +6963,8 @@ int qemu_savevm_state_complete(QEMUFile *f)

     for(se = first_se; se != NULL; se = se->next) {
         int len;
+        if (kemari_enabled && strstr(se->idstr, "vga"))
+            continue;

 	if (se->save_state == NULL)
 	    continue;
@@ -9005,6 +9009,25 @@ static void termsig_setup(void)
     sigaction(SIGTERM, &act, NULL);
 }

+void xenstore_process_logdirty_event(void);
+static void kemari_handler(int dummy)
+{
+    kemari_enabled = 1; /* QEMU will run in kemari mode */
+    xenstore_process_logdirty_event();
+}
+
+static void kemari_setup(void)
+{
+    struct sigaction act;
+
+    memset(&act, 0, sizeof(act));
+#ifdef CONFIG_DM
+    act.sa_handler = kemari_handler;
+#else /* !CONFIG_DM */
+    act.sa_handler = SIG_DFL;
+#endif /* CONFIG_DM */
+    sigaction(SIGUSR1, &act, NULL);
+}
 #endif

 int main(int argc, char **argv)
@@ -10045,6 +10068,7 @@ int main(int argc, char **argv)
 #ifndef _WIN32
     /* must be after terminal init, SDL library changes signal handlers */
     termsig_setup();
+    kemari_setup();
 #endif

     /* Maintain compatibility with multiple stdio monitors */
diff --git a/xen-config-host.h b/xen-config-host.h
index 3d53364..8c7fa28 100644
--- a/xen-config-host.h
+++ b/xen-config-host.h
@@ -41,3 +41,4 @@ void xenstore_store_serial_port_info(int i, struct CharDriverState *chr,

 extern unsigned long *logdirty_bitmap;
 extern unsigned long logdirty_bitmap_size;
+extern volatile int kemari_enabled;

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

end of thread, other threads:[~2009-03-24  6:59 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06  5:47 [RFC][PATCH 00/13] Kemari: VM synchronization mechanism for fault tolerance Yoshiaki Tamura
2009-03-06  5:50 ` [RFC][PATCH 01/13] Kemari: add ECS_TAP state to event channel Yoshiaki Tamura
2009-03-06  5:53 ` [RFC][PATCH 02/13] Kemari: core kemari code Yoshiaki Tamura
2009-03-06  5:54 ` [RFC][PATCH 03/13] Kemari: change parameter type of xc_{set, get}_hvm_param Yoshiaki Tamura
2009-03-06  5:56 ` [RFC][PATCH 04/13] Kemari: Kemari controller interface in libxc Yoshiaki Tamura
2009-03-06  6:26 ` [RFC][PATCH 05/13] Kemari: Kemari sender Yoshiaki Tamura
2009-03-06  6:46 ` [RFC][PATCH 06/13] Kemari: Kemari receiver Yoshiaki Tamura
2009-03-06  6:46 ` [RFC][PATCH 07/13] Kemari: add Kemari support to python Yoshiaki Tamura
2009-03-06  6:46 ` [RFC][PATCH 08/13] Kemari: add dev state "Attached" " Yoshiaki Tamura
2009-03-06  6:47 ` [RFC][PATCH 09/13] Kemari: add XenbusStateAttached to xenbus Yoshiaki Tamura
2009-03-06  6:47 ` [RFC][PATCH 10/13] Kemari: XenbusStateAttached handler for blkback Yoshiaki Tamura
2009-03-06  6:47 ` [RFC][PATCH 11/13] Kemari: XenbusStateAttached handler for netback Yoshiaki Tamura
2009-03-06  6:47 ` [RFC][PATCH 12/13] Kemari: use signal to save qemu state for Kemari Yoshiaki Tamura
2009-03-06 11:39   ` Stefano Stabellini
2009-03-06 16:20     ` Yoshiaki Tamura
2009-03-17 17:55       ` Stefano Stabellini
2009-03-17 18:21         ` Ian Jackson
2009-03-17 18:35           ` Stefano Stabellini
2009-03-18  9:11             ` Yoshiaki Tamura
2009-03-18  9:34               ` Keir Fraser
2009-03-18 12:45                 ` Yoshiaki Tamura
2009-03-18 12:46               ` Stefano Stabellini
2009-03-18 13:06                 ` Keir Fraser
2009-03-19  5:54                   ` Yoshiaki Tamura
2009-03-18 17:37               ` Christopher Head
2009-03-19  6:07                 ` Yoshiaki Tamura
2009-03-16 18:05     ` Ian Jackson
2009-03-06  6:47 ` [RFC][PATCH 13/13] Kemari: use shared region with to flip logdirty_bitmap Yoshiaki Tamura
  -- strict thread matches above, loose matches on Subject: below --
2009-03-12  1:22 [RFC][PATCH 12/13] Kemari: use signal to save qemu state for Kemari Yoshiaki Tamura
2009-03-24  6:59 ` Yoshiaki Tamura

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.