From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzP2d-0005BH-WA for qemu-devel@nongnu.org; Wed, 26 Oct 2016 10:19:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzP2Z-0007SF-Dx for qemu-devel@nongnu.org; Wed, 26 Oct 2016 10:18:55 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:4076) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1bzP2Y-0007Nw-H6 for qemu-devel@nongnu.org; Wed, 26 Oct 2016 10:18:51 -0400 References: <1476792613-11712-1-git-send-email-zhang.zhanghailiang@huawei.com> <1476792613-11712-7-git-send-email-zhang.zhanghailiang@huawei.com> <20161026052514.GF1679@amit-lp.rh> From: Hailiang Zhang Message-ID: <5810BB1D.10708@huawei.com> Date: Wed, 26 Oct 2016 22:18:05 +0800 MIME-Version: 1.0 In-Reply-To: <20161026052514.GF1679@amit-lp.rh> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit 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: Amit Shah 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 2016/10/26 13:25, Amit Shah wrote: > 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! > You're welcome. I'm glad to make your maintainers' review easy. :) >> --- 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 Quit reasonable. I will fix it in next version. > 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. > You are right, the full name of COLO appears in patch one, I'll add it there. Thanks. hailiang > > Amit > > . >