From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnSbI-0008AR-NM for qemu-devel@nongnu.org; Thu, 22 May 2014 09:00:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnSbE-0000y7-AO for qemu-devel@nongnu.org; Thu, 22 May 2014 09:00:00 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:52781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnSbD-0000iQ-HP for qemu-devel@nongnu.org; Thu, 22 May 2014 08:59:56 -0400 Message-ID: <537DF455.4070401@huawei.com> Date: Thu, 22 May 2014 20:57:57 +0800 From: ChenLiang MIME-Version: 1.0 References: <1400608075-19917-1-git-send-email-sanidhya.iiith@gmail.com> <537C27D3.6070804@huawei.com> <537C4B72.2040807@huawei.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/6] Obtain dirty bitmap via VM logging List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sanidhya Kashyap Cc: qemu-devel , dgilbert@redhat.com, "quintela@redhat.com" On 2014/5/22 19:21, Sanidhya Kashyap wrote: > On Wed, May 21, 2014 at 12:15 PM, ChenLiang wrote: >> On 2014/5/21 12:56, Sanidhya Kashyap wrote: >> >>> On Wed, May 21, 2014 at 9:43 AM, ChenLiang wrote: >>>> Hi, >>>> Nice job. We should avoid running migration_thread and bitmap_logging_thread simultaneously. >>>> >>> Any particular suggestion to avoid running simultaneous execution of >>> the threads? >>> >> >> We can do it like this: >> https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg02185.html >> > > Hi Chen, > > I have some questions which I wanted to get clarified before > implementing the above part of avoiding the simultaneous execution. > > As the migration process is going on, the RUN_STATE_RUNNING state is > being used, which is the same case in bitmap dump process. In order to > use the concept of RUN_STATE_* states, should I create two new states > as RUN_STATE_LOGBITMAP AND RUN_STATE_OUTMIGRATE? The > RUN_STATE_OUTMIGRATE state will have all the transitions that > RUN_STATE_RUNNING supports except the ones being used by migration. > Similarly, RUN_STATE_MIGRATE will support all the transitions of > RUN_STATE_RUNNING except RUN_STATE_LOGBITMAP. > > We might also have to update the runstate_is_running function, since > RUN_STATE_LOGBITMAP and RUN_STATE_MIGRATE are almost similar in nature > to the RUN_STATE_RUNNING. What is your opinion about that? > > Is it the only approach to do it or are there any simple and efficient > approaches? > > Thanks, > Sanidhya > > Hmm, I think we need the two flags. Although it is little hard to do it. Because the vm can't do something like hotplug vcpu or device during migrate. But for now qemu don't guarantee it(in my reading). So we should change the vm state RUN_STATE_RUNNING to RUN_STATE_MIGRATE when migrate. BTW, it is not your patches problem. cc: Juan Best regards ChenLiang