|
From: | Hailiang Zhang |
Subject: | Re: [Qemu-devel] [PATCH COLO-Frame v11 38/39] colo: Use default buffer-filter to buffer and release packets |
Date: | Sat, 28 Nov 2015 14:15:22 +0800 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
On 2015/11/27 20:51, Yang Hongyang wrote:
On 2015年11月24日 17:25, zhanghailiang wrote:Enable default filter to buffer packets and release the packets after a checkpoint. Signed-off-by: zhanghailiang <address@hidden> Cc: Jason Wang <address@hidden> Cc: Yang Hongyang <address@hidden> --- v11: - Use new helper functions to buffer and release packets. --- migration/colo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/migration/colo.c b/migration/colo.c index 79a8d6b..b1b7905 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -19,6 +19,7 @@ #include "qemu/sockets.h" #include "migration/failover.h" #include "qapi-event.h" +#include "net/filter.h" /* * The delay time before qemu begin the procedure of default failover treatment. @@ -131,6 +132,8 @@ static void primary_vm_do_failover(void) "old_state: %d", old_state); return; } + /* Don't buffer any packets while exited COLO */ + qemu_set_default_filter_buffers(false);You might need to release packets before exited COLO ?
Yes, we should flush the queue and release the buffered packets. I will fix this it in next version, thanks.
} void colo_do_failover(MigrationState *s) @@ -290,6 +293,8 @@ static int colo_do_checkpoint_transaction(MigrationState *s, goto out; } + qemu_release_default_filters_packets(); + if (colo_shutdown) { colo_ctl_put(s->to_dst_file, COLO_COMMAND_GUEST_SHUTDOWN, 0); qemu_fflush(s->to_dst_file); @@ -367,6 +372,8 @@ static void colo_process_checkpoint(MigrationState *s) error_report("Failed to allocate colo buffer!"); goto out; } + /* Begin to buffer packets that sent by VM */ + qemu_set_default_filter_buffers(true); qemu_mutex_lock_iothread(); vm_start();
[Prev in Thread] | Current Thread | [Next in Thread] |