From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFylD-0007o1-Co for qemu-devel@nongnu.org; Tue, 18 Feb 2014 23:28:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFyl4-00059k-B4 for qemu-devel@nongnu.org; Tue, 18 Feb 2014 23:27:51 -0500 Received: from e39.co.us.ibm.com ([32.97.110.160]:57131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFyl4-00059V-4G for qemu-devel@nongnu.org; Tue, 18 Feb 2014 23:27:42 -0500 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 18 Feb 2014 21:27:41 -0700 Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 6162BC90042 for ; Tue, 18 Feb 2014 23:27:35 -0500 (EST) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp23034.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s1J4Rcc13408146 for ; Wed, 19 Feb 2014 04:27:38 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s1J4Rbw4000516 for ; Tue, 18 Feb 2014 23:27:38 -0500 Message-ID: <530432B0.20202@linux.vnet.ibm.com> Date: Wed, 19 Feb 2014 12:27:28 +0800 From: "Michael R. Hines" MIME-Version: 1.0 References: <1392713429-18201-1-git-send-email-mrhines@linux.vnet.ibm.com> <1392713429-18201-9-git-send-email-mrhines@linux.vnet.ibm.com> <530403E9.7060501@cn.fujitsu.com> <530413EE.30307@linux.vnet.ibm.com> <53041C8E.2060902@cn.fujitsu.com> In-Reply-To: <53041C8E.2060902@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v2 08/12] mc: core logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Li Guang Cc: GILR@il.ibm.com, SADEKJ@il.ibm.com, quintela@redhat.com, hinesmr@cn.ibm.com, qemu-devel@nongnu.org, EREZH@il.ibm.com, owasserm@redhat.com, junqing.wang@cs2c.com.cn, onom@us.ibm.com, abali@us.ibm.com, "Michael R. Hines" , gokul@us.ibm.com, dbulkow@gmail.com, pbonzini@redhat.com, BIRAN@il.ibm.com, isaku.yamahata@gmail.com 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, >>> mrhines@linux.vnet.ibm.com wrote: >>>> From: "Michael R. Hines" >>>> >>>> This implements the core logic, >>>> all described in the first patch (docs/mc.txt). >>>> >>>> Signed-off-by: Michael R. Hines >>>> --- >>>> 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