qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: mrhines@linux.vnet.ibm.com
To: qemu-devel@nongnu.org
Cc: hinesmr@cn.ibm.com, "Michael R. Hines" <mrhines@us.ibm.com>,
	quintela@redhat.com
Subject: [Qemu-devel] [RFC PATCH v1 1/3] provenance: QMP command to store MigrationInfo from JSON
Date: Tue, 18 Feb 2014 13:53:20 +0800	[thread overview]
Message-ID: <1392702802-11592-2-git-send-email-mrhines@linux.vnet.ibm.com> (raw)
In-Reply-To: <1392702802-11592-1-git-send-email-mrhines@linux.vnet.ibm.com>

From: "Michael R. Hines" <mrhines@us.ibm.com>

This is the QMP documentation and schema for a command that allows
the migration protocol on the destination side to 'install' a whole
MigrationInfo json structure as received in-tact from the source
into the MigrationState struct so that query-migrate can print the
information as-is without having to install the values one-by-one.

Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
---
 qapi-schema.json | 14 ++++++++++++++
 qmp-commands.hx  | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/qapi-schema.json b/qapi-schema.json
index 7cfb5e5..c84ca0f 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -717,6 +717,20 @@
   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
 
 ##
+# @migrate-set-last-info
+#
+# Store migration info/statistics. Currently only used by the migration
+# protocol itself to tell the destination about the results before
+# the source QEMU is destroyed.
+#
+# @info: json array of MigrationInfo statistics from a previous migration.
+#
+# Since: 2.0
+##
+{ 'command': 'migrate-set-last-info',
+  'data': { 'info': 'MigrationInfo' } }
+
+##
 # @query-migrate-capabilities
 #
 # Returns information about the current migration capabilities status
diff --git a/qmp-commands.hx b/qmp-commands.hx
index cce6b81..1108940 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -3015,6 +3015,39 @@ EQMP
         .params     = "capability:s,state:b",
 	.mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
     },
+
+SQMP
+migrate-set-last-info
+------------------------
+
+Store migration info/statistics. Currently only used by the migration
+protocol itself to tell the destination about the results before
+the source QEMU is destroyed.
+
+NOTE: There is no need to execute this command explicitly except for
+testing, as this information is already transmitted as part of the 
+migration protocol. Thus, there is no HMP command made available for
+this option - only QMP.
+
+The example below is simple, but the migration protocol will actually
+transfer the entire JSON string that originated from the source, no
+matter what is inside of it, which should survive future version of
+QEMU when new statistics are added to the protocol.
+
+Arguments:
+- info: MigrationInfo statistics dictionary (json-object)
+
+Example:
+
+-> { "execute": "migrate-set-last-info" , "arguments":
+     { "info": { "downtime": 1234, "ram" : { "transferred" : 5678 } } } }
+EQMP
+    {
+        .name       = "migrate-set-last-info",
+        .args_type  = "info:O",
+        .mhandler.cmd_new = qmp_marshal_input_migrate_set_last_info,
+    },
+
 SQMP
 query-migrate-capabilities
 --------------------------
-- 
1.8.1.2

  reply	other threads:[~2014-02-18  5:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18  5:53 [Qemu-devel] [RFC PATCH v1 0/3] provenance: save migration stats after completion to destination mrhines
2014-02-18  5:53 ` mrhines [this message]
2014-02-18  5:53 ` [Qemu-devel] [RFC PATCH v1 2/3] provenance: serialize MigrationInfo across the wire mrhines
2014-02-18  5:53 ` [Qemu-devel] [RFC PATCH v1 3/3] provenance: expose the serialization save/load functions for migration mrhines
2014-02-18 13:40 ` [Qemu-devel] [RFC PATCH v1 0/3] provenance: save migration stats after completion to destination Eric Blake
2014-02-19  2:30   ` Michael R. Hines
2014-02-19  2:40     ` Eric Blake
2014-02-19  4:22       ` Michael R. Hines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1392702802-11592-2-git-send-email-mrhines@linux.vnet.ibm.com \
    --to=mrhines@linux.vnet.ibm.com \
    --cc=hinesmr@cn.ibm.com \
    --cc=mrhines@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).