[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 17/17] HACK: trigger checkpoint every 500ms
From: |
Yang Hongyang |
Subject: |
[Qemu-devel] [RFC PATCH 17/17] HACK: trigger checkpoint every 500ms |
Date: |
Wed, 23 Jul 2014 22:25:38 +0800 |
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 <address@hidden>
---
migration-colo.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/migration-colo.c b/migration-colo.c
index 52156e7..4be037e 100644
--- a/migration-colo.c
+++ b/migration-colo.c
@@ -23,7 +23,7 @@
* this is large because COLO checkpoint will mostly depend on
* COLO compare module.
*/
-#define CHKPOINT_TIMER 10000
+#define CHKPOINT_TIMER 500
enum {
COLO_READY = 0x46,
@@ -79,11 +79,6 @@ static int comp_fd = -1;
static int colo_compare_init(void)
{
- comp_fd = open(COMPARE_DEV, O_RDONLY);
- if (comp_fd < 0) {
- return -1;
- }
-
return 0;
}
@@ -104,17 +99,18 @@ static void colo_compare_destroy(void)
*/
static int colo_compare(void)
{
- return ioctl(comp_fd, COMP_IOCTWAIT, 250);
+ errno = ERESTART;
+ return 1;
}
static int colo_compare_flush(void)
{
- return ioctl(comp_fd, COMP_IOCTFLUSH, 1);
+ return 0;
}
static int colo_compare_resume(void)
{
- return ioctl(comp_fd, COMP_IOCTRESUME, 1);
+ return 0;
}
/* colo buffer */
--
1.9.1
- [Qemu-devel] [RFC PATCH 10/17] COLO ctl: introduce is_slave() and is_master(), (continued)
- [Qemu-devel] [RFC PATCH 10/17] COLO ctl: introduce is_slave() and is_master(), Yang Hongyang, 2014/07/23
- [Qemu-devel] [RFC PATCH 02/17] COLO: introduce an api colo_supported() to indicate COLO support, Yang Hongyang, 2014/07/23
- [Qemu-devel] [RFC PATCH 12/17] COLO ctl: add a RunState RUN_STATE_COLO, Yang Hongyang, 2014/07/23
- [Qemu-devel] [RFC PATCH 11/17] COLO ctl: implement colo checkpoint protocol, Yang Hongyang, 2014/07/23
- [Qemu-devel] [RFC PATCH 13/17] COLO ctl: implement colo save, Yang Hongyang, 2014/07/23
- [Qemu-devel] [RFC PATCH 14/17] COLO ctl: implement colo restore, Yang Hongyang, 2014/07/23
- [Qemu-devel] [RFC PATCH 15/17] COLO save: reuse migration bitmap under colo checkpoint, Yang Hongyang, 2014/07/23
- [Qemu-devel] [RFC PATCH 16/17] COLO ram cache: implement colo ram cache on slaver, Yang Hongyang, 2014/07/23
- [Qemu-devel] [RFC PATCH 17/17] HACK: trigger checkpoint every 500ms,
Yang Hongyang <=
- Re: [Qemu-devel] [RFC PATCH 00/17] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service, Eric Blake, 2014/07/23