qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 06/17] COLO: Introduce che


From: Hailiang Zhang
Subject: Re: [Qemu-devel] [PATCH COLO-Frame (Base) v21 06/17] COLO: Introduce checkpointing protocol
Date: Wed, 26 Oct 2016 22:18:05 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

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 <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Cc: Eric Blake <address@hidden>
Cc: Markus Armbruster <address@hidden>
Cc: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>

Reviewed-by: Amit Shah <address@hidden>

+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

.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]