On 02/19/2014 10:53 AM, Li Guang wrote:
Michael R. Hines wrote:
On 02/19/2014 09:07 AM, Li Guang wrote:
Hi,
mrhi...@linux.vnet.ibm.com wrote:
From: "Michael R. Hines"<mrhi...@us.ibm.com>
This implements the core logic,
all described in the first patch (docs/mc.txt).
Signed-off-by: Michael R. Hines<mrhi...@us.ibm.com>
---
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!
That ability is already available in the patchset.
It is called "mc-net-disable" capability. (See the wiki or docs/mc.txt).
Did you try it?
I don't mean disable it manually, I say even don't start buffering
for network when no netdev.
Thanks!
Oh, I see. Got it. I will update the patch =).
- Michael