From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dr. David Alan Gilbert" Subject: Re: [RFC PATCH 05/17] COLO save: integrate COLO checkpointed save into qemu migration Date: Fri, 1 Aug 2014 15:46:57 +0100 Message-ID: <20140801144656.GB2430@work-vm> References: <1406125538-27992-1-git-send-email-yanghy@cn.fujitsu.com> <1406125538-27992-6-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, eddie.dong@intel.com, GuiJianfeng@cn.fujitsu.com, dgilbert@redhat.com, mrhines@linux.vnet.ibm.com, wency@cn.fujitsu.com To: Yang Hongyang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:26652 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751303AbaHAOrI (ORCPT ); Fri, 1 Aug 2014 10:47:08 -0400 Content-Disposition: inline In-Reply-To: <1406125538-27992-6-git-send-email-yanghy@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: * Yang Hongyang (yanghy@cn.fujitsu.com) wrote: > Integrate COLO checkpointed save flow into qemu migration. > Add a migrate state: MIG_STATE_COLO, enter this migrate state > after the first live migration successfully finished. > Create a colo thread to do the checkpointed save. In postcopy I added a 'migration_already_active' function to merge all the different places that check for ACTIVE/SETUP etc. ( http://lists.gnu.org/archive/html/qemu-devel/2014-07/msg00850.html ) > + /*TODO: COLO checkpointed save loop*/ > + > + if (s->state != MIG_STATE_ERROR) { > + migrate_set_state(s, MIG_STATE_COLO, MIG_STATE_COMPLETED); > + } I thought migrate_set_state only changed the state if the old state matched the 1st value - i.e. I think it'll only change to COMPLETED if the state is COLO; so I don't think you need the if. Dave -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDE70-00080E-Bd for qemu-devel@nongnu.org; Fri, 01 Aug 2014 10:47:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDE6u-0007Jr-6D for qemu-devel@nongnu.org; Fri, 01 Aug 2014 10:47:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDE6t-0007JU-Vf for qemu-devel@nongnu.org; Fri, 01 Aug 2014 10:47:08 -0400 Date: Fri, 1 Aug 2014 15:46:57 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20140801144656.GB2430@work-vm> References: <1406125538-27992-1-git-send-email-yanghy@cn.fujitsu.com> <1406125538-27992-6-git-send-email-yanghy@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1406125538-27992-6-git-send-email-yanghy@cn.fujitsu.com> Subject: Re: [Qemu-devel] [RFC PATCH 05/17] COLO save: integrate COLO checkpointed save into qemu migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yang Hongyang Cc: kvm@vger.kernel.org, GuiJianfeng@cn.fujitsu.com, eddie.dong@intel.com, qemu-devel@nongnu.org, mrhines@linux.vnet.ibm.com, dgilbert@redhat.com * Yang Hongyang (yanghy@cn.fujitsu.com) wrote: > Integrate COLO checkpointed save flow into qemu migration. > Add a migrate state: MIG_STATE_COLO, enter this migrate state > after the first live migration successfully finished. > Create a colo thread to do the checkpointed save. In postcopy I added a 'migration_already_active' function to merge all the different places that check for ACTIVE/SETUP etc. ( http://lists.gnu.org/archive/html/qemu-devel/2014-07/msg00850.html ) > + /*TODO: COLO checkpointed save loop*/ > + > + if (s->state != MIG_STATE_ERROR) { > + migrate_set_state(s, MIG_STATE_COLO, MIG_STATE_COMPLETED); > + } I thought migrate_set_state only changed the state if the old state matched the 1st value - i.e. I think it'll only change to COMPLETED if the state is COLO; so I don't think you need the if. Dave -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK