Hi,
address@hidden wrote:
From: "Michael R. Hines"<address@hidden>
This implements the core logic,
all described in the first patch (docs/mc.txt).
Signed-off-by: Michael R. Hines<address@hidden>
---
migration-checkpoint.c | 1565
++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 1565 insertions(+)
create mode 100644 migration-checkpoint.c
[big snip] ...
+
+/*
+ * Stop the VM, generate the micro checkpoint,
+ * but save the dirty memory into staging memory until
+ * we can re-activate the VM as soon as possible.
+ */
+static int capture_checkpoint(MCParams *mc, MigrationState *s)
+{
+ MCCopyset *copyset;
+ int idx, ret = 0;
+ uint64_t start, stop, copies = 0;
+ int64_t start_time;
+
+ mc->total_copies = 0;
+ qemu_mutex_lock_iothread();
+ vm_stop_force_state(RUN_STATE_CHECKPOINT_VM);
+ start = qemu_clock_get_ms(QEMU_CLOCK_REALTIME);
+
+ /*
+ * If buffering is enabled, insert a Qdisc plug here
+ * to hold packets for the *next* MC, (not this one,
+ * the packets for this one have already been plugged
+ * and will be released after the MC has been transmitted.
+ */
+ mc_start_buffer();
actually, I have a special request,
if QEMU started without netdev,
then don't bother me by Qdisc for network buffering. :-)
Thanks!