From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzGiK-0007FN-60 for qemu-devel@nongnu.org; Wed, 26 Oct 2016 01:25:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzGiG-0006Nj-83 for qemu-devel@nongnu.org; Wed, 26 Oct 2016 01:25:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55460) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzGiG-0006NP-0W for qemu-devel@nongnu.org; Wed, 26 Oct 2016 01:25:20 -0400 Date: Wed, 26 Oct 2016 10:55:14 +0530 From: Amit Shah Message-ID: <20161026052514.GF1679@amit-lp.rh> References: <1476792613-11712-1-git-send-email-zhang.zhanghailiang@huawei.com> <1476792613-11712-7-git-send-email-zhang.zhanghailiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476792613-11712-7-git-send-email-zhang.zhanghailiang@huawei.com> Subject: Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 06/17] COLO: Introduce checkpointing protocol List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: zhanghailiang Cc: quintela@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com, wency@cn.fujitsu.com, lizhijian@cn.fujitsu.com, xiecl.fnst@cn.fujitsu.com, Gonglei , Eric Blake , Markus Armbruster On (Tue) 18 Oct 2016 [20:10:02], zhanghailiang wrote: > We need communications protocol of user-defined to control > the checkpointing process. > > The new checkpointing request is started by Primary VM, > and the interactive process like below: > > Checkpoint synchronizing points: > > Primary Secondary > initial work > 'checkpoint-ready' <-------------------- @ > > 'checkpoint-request' @ --------------------> > Suspend (Only in hybrid mode) > 'checkpoint-reply' <-------------------- @ > Suspend&Save state > 'vmstate-send' @ --------------------> > Send state Receive state > 'vmstate-received' <-------------------- @ > Release packets Load state > 'vmstate-load' <-------------------- @ > Resume Resume (Only in hybrid mode) > > Start Comparing (Only in hybrid mode) > NOTE: > 1) '@' who sends the message > 2) Every sync-point is synchronized by two sides with only > one handshake(single direction) for low-latency. > If more strict synchronization is required, a opposite direction > sync-point should be added. > 3) Since sync-points are single direction, the remote side may > go forward a lot when this side just receives the sync-point. > 4) For now, we only support 'periodic' checkpoint, for which > the Secondary VM is not running, later we will support 'hybrid' mode. > > Signed-off-by: zhanghailiang > Signed-off-by: Li Zhijian > Signed-off-by: Gonglei > Cc: Eric Blake > Cc: Markus Armbruster > Cc: Dr. David Alan Gilbert > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah > +static int colo_do_checkpoint_transaction(MigrationState *s) > +{ > + Error *local_err = NULL; > + > + colo_send_message(s->to_dst_file, COLO_MESSAGE_CHECKPOINT_REQUEST, > + &local_err); > + if (local_err) { > + goto out; > + } > + > + colo_receive_check_message(s->rp_state.from_dst_file, > + COLO_MESSAGE_CHECKPOINT_REPLY, &local_err); > + if (local_err) { > + goto out; > + } > + > + /* TODO: suspend and save vm state to colo buffer */ I like how you've split up the patches - makes it easier to review. Thanks for doing this! > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -785,6 +785,31 @@ > { 'command': 'migrate-start-postcopy' } > > ## > +# @COLOMessage > +# > +# The message transmission between PVM and SVM Can you expand PVM and SVM for the first use? It's obvious to someone who's familiar with COLO, but someone looking at the api may not know what it all means. Also, please expand COLO if not already done in the qapi-schema file. Amit