On 01/03/2018 12:26 AM, Eric Blake wrote:
On 10/30/2017 08:16 AM, Alexey Perevalov wrote:
Postcopy total blocktime is available on destination side only.
But query-migrate was possible only for source. This patch
adds ability to call query-migrate on destination.
To be able to see postcopy blocktime, need to request postcopy-blocktime
capability.
Why not display the stats unconditionally when they are available,
instead of having to set a capability knob to request them?
That knob necessary to avoid regression if this information
is not necessary, we decided during so long discussion in previous
version of the patch set - it's not necessary always.
But if user requested blocktime and host can't calculate it,
e.g. due to appropriate feature isn't supported in host kernel,
yes, the value will be 0.
The query-migrate command will show following sample result:
{"return":
"postcopy-vcpu-blocktime": [115, 100],
"status": "completed",
"postcopy-blocktime": 100
}}
postcopy_vcpu_blocktime contains list, where the first item is the first
vCPU in QEMU.
This patch has a drawback, it combines states of incoming and
outgoing migration. Ongoing migration state will overwrite incoming
state. Looks like better to separate query-migrate for incoming and
outgoing migration or add parameter to indicate type of migration.
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com>
Signed-off-by: Alexey Perevalov <a.pereva...@samsung.com>
---
+++ b/qapi/migration.json
@@ -156,6 +156,13 @@
# @status is 'failed'. Clients should not attempt to parse the
# error strings. (Since 2.7)
#
+# @postcopy-blocktime: total time when all vCPU were blocked during postcopy
+# live migration (Since 2.11)
2.12 now.
Should this mention the capability knob needed to enable this stat (or
else get rid of the capability knob and always expose this when possible)?
+#
+# @postcopy-vcpu-blocktime: list of the postcopy blocktime per vCPU (Since
2.11)
Also 2.12.
+#
+
+#
# Since: 0.14.0
##
{ 'struct': 'MigrationInfo',
@@ -167,7 +174,9 @@
'*downtime': 'int',
'*setup-time': 'int',
'*cpu-throttle-percentage': 'int',
- '*error-desc': 'str'} }
+ '*error-desc': 'str',
+ '*postcopy-blocktime' : 'int64',
+ '*postcopy-vcpu-blocktime': ['int64']} }
##
# @query-migrate:
--
Best regards,
Alexey Perevalov