[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 10/10] migration/dirtyrate: Implement qmp_cal_dirty_rate()
From: |
Eric Blake |
Subject: |
Re: [PATCH v3 10/10] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function |
Date: |
Thu, 20 Aug 2020 12:17:15 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 8/16/20 10:20 PM, Chuan Zheng wrote:
Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be
called
Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
---
+++ b/qapi/migration.json
@@ -1621,3 +1621,45 @@
##
{ 'event': 'UNPLUG_PRIMARY',
'data': { 'device-id': 'str' } }
+
+##
+# @DirtyRateInfo:
+#
+# Information about current dirty page rate of vm.
+#
+# @dirty-rate: @dirtyrate describing the dirty page rate of vm
+# in units of MB/s.
+# If this field return '-1', it means querying is not
+# start or not complete.
+#
+# @status: @status containing dirtyrate query status includes
+# status with 'not start measuring' or
+# 'Still measuring' or 'measured'(since 5.2)
Missing space before (
+##
+{ 'struct': 'DirtyRateInfo',
+ 'data': {'dirty-rate': 'int64',
+ 'status': 'str'} }
Based on your description, this should be an enum type rather than an
open-coded string. Something like:
{ 'enum': 'DirtyRateStatus', 'data': [ 'unstarted', 'measuring',
'measured' ] }
{ 'struct': 'DirtyRateInfo', 'data': { 'dirty-rate': 'int64', 'status':
'DirtyRateStatus' } }
+
+##
+# @calc-dirty-rate:
+#
+# start calculating dirty page rate for vm
+#
+# @calc-time: time in units of second for sample dirty pages
+#
+# Since: 5.2
+#
+# Example:
+# {"command": "cal-dirty-rate", "data": {"calc-time": 1} }
+#
+##
+{ 'command': 'calc-dirty-rate', 'data': {'calc-time': 'int64'} }
+
+##
+# @query-dirty-rate:
+#
+# query dirty page rate in units of MB/s for vm
+#
+# Since: 5.2
+##
+{ 'command': 'query-dirty-rate', 'returns': 'DirtyRateInfo' }
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
Re: [PATCH v3 00/10] *** A Method for evaluating dirty page rate ***, no-reply, 2020/08/16