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