[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH COLO-Frame v15 37/38] COLO: flush buffered packets i
From: |
zhanghailiang |
Subject: |
[Qemu-devel] [PATCH COLO-Frame v15 37/38] COLO: flush buffered packets in checkpoint process or exit COLO |
Date: |
Mon, 22 Feb 2016 10:40:31 +0800 |
In COLO periodic mode, the packets from VM should not be sent
during the time interval of two checkpoints, we will release
all these buffered packets after the checkpoint process, before
VM is resumed.
In this way, we can ensure not to break the network services if
COLO goes into failover process.
Signed-off-by: zhanghailiang <address@hidden>
Cc: Jason Wang <address@hidden>
Cc: Yang Hongyang <address@hidden>
---
v15:
- Re-implement colo_flush_filter_packets() based on COLOBufferFilters list
---
migration/colo.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/migration/colo.c b/migration/colo.c
index 4c39204..a2d489b 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -124,6 +124,17 @@ static void colo_set_filter_status(const char *status,
Error **errp)
}
}
+static void colo_flush_filter_packets(Error **errp)
+{
+ struct COLOListNode *e, *next;
+ NetFilterState *nf;
+
+ QLIST_FOREACH_SAFE(e, &COLOBufferFilters, node, next) {
+ nf = e->opaque;
+ filter_buffer_flush(nf);
+ }
+}
+
static void primary_vm_do_failover(void)
{
MigrationState *s = migrate_get_current();
@@ -157,6 +168,7 @@ static void primary_vm_do_failover(void)
if (local_err) {
error_report_err(local_err);
}
+ colo_flush_filter_packets(NULL);
/* Notify COLO thread that failover work is finished */
qemu_sem_post(&s->colo_sem);
@@ -364,6 +376,8 @@ static int colo_do_checkpoint_transaction(MigrationState *s,
if (local_err) {
goto out;
}
+ /* FIXME: Remove this after switch to use colo-proxy */
+ colo_flush_filter_packets(NULL);
if (colo_shutdown_requested) {
colo_put_cmd(s->to_dst_file, COLO_MESSAGE_GUEST_SHUTDOWN, &local_err);
--
1.8.3.1
- [Qemu-devel] [PATCH COLO-Frame v15 13/38] COLO: Load VMState into qsb before restore it, (continued)
- [Qemu-devel] [PATCH COLO-Frame v15 13/38] COLO: Load VMState into qsb before restore it, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 32/38] filter-buffer: Accept zero interval, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 35/38] COLO: manage the status of buffer filters for PVM, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 26/38] savevm: Introduce two helper functions for save/find loadvm_handlers entry, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 34/38] COLO/filter: add each netdev a buffer filter, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 21/38] qmp event: Add COLO_EXIT event to notify users while exited from COLO, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 31/38] net/filter: Add a 'status' property for filter object, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 38/38] COLO: Add block replication into colo process, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 22/38] COLO failover: Shutdown related socket fd when do failover, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 36/38] filter-buffer: make filter_buffer_flush() public, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 37/38] COLO: flush buffered packets in checkpoint process or exit COLO,
zhanghailiang <=
- [Qemu-devel] [PATCH COLO-Frame v15 16/38] COLO: synchronize PVM's state to SVM periodically, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 27/38] migration/savevm: Add new helpers to process the different stages of loadvm, zhanghailiang, 2016/02/21
- [Qemu-devel] [PATCH COLO-Frame v15 28/38] migration/savevm: Export two helper functions for savevm process, zhanghailiang, 2016/02/21
- Re: [Qemu-devel] [PATCH COLO-Frame v15 00/38] COarse-grain LOck-stepping(COLO) Virtual Machines for Non-stop Service (FT), Dr. David Alan Gilbert, 2016/02/25