* [PULL 0/2] QAPI patches patches for 2023-07-10
@ 2023-07-10 11:19 Markus Armbruster
2023-07-10 11:19 ` [PULL 1/2] qapi: better docs for calc-dirty-rate and friends Markus Armbruster
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Markus Armbruster @ 2023-07-10 11:19 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson
The following changes since commit 2ff49e96accc8fd9a38e9abd16f0cfa0adab1605:
Merge tag 'pull-tcg-20230709' of https://gitlab.com/rth7680/qemu into staging (2023-07-09 15:01:43 +0100)
are available in the Git repository at:
https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2023-07-10
for you to fetch changes up to fd658a7b8cf1091ae2914655add4511865d7edc0:
migration.json: Don't use space before colon (2023-07-10 07:47:36 +0200)
----------------------------------------------------------------
QAPI patches patches for 2023-07-10
----------------------------------------------------------------
Andrei Gudkov (1):
qapi: better docs for calc-dirty-rate and friends
Juan Quintela (1):
migration.json: Don't use space before colon
qapi/migration.json | 117 ++++++++++++++++++++++++++++++++++++----------------
1 file changed, 81 insertions(+), 36 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PULL 1/2] qapi: better docs for calc-dirty-rate and friends
2023-07-10 11:19 [PULL 0/2] QAPI patches patches for 2023-07-10 Markus Armbruster
@ 2023-07-10 11:19 ` Markus Armbruster
2023-07-10 11:19 ` [PULL 2/2] migration.json: Don't use space before colon Markus Armbruster
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2023-07-10 11:19 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, Andrei Gudkov, Peter Xu
From: Andrei Gudkov <gudkov.andrei@huawei.com>
Rewrote calc-dirty-rate documentation. Briefly described
different modes of dirty page rate measurement. Added some
examples. Fixed obvious grammar errors.
Signed-off-by: Andrei Gudkov <gudkov.andrei@huawei.com>
Message-Id: <fe7d32a621ebd69ef6974beb2499c0b5dccb9e19.1684854849.git.gudkov.andrei@huawei.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
[Prose tweaked and spacing corrected, as per review]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
qapi/migration.json | 97 +++++++++++++++++++++++++++++++++------------
1 file changed, 71 insertions(+), 26 deletions(-)
diff --git a/qapi/migration.json b/qapi/migration.json
index 47dfef0278..52ff5bee98 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1745,14 +1745,13 @@
##
# @DirtyRateStatus:
#
-# An enumeration of dirtyrate status.
+# Dirty page rate measurement status.
#
-# @unstarted: the dirtyrate thread has not been started.
+# @unstarted: measuring thread has not been started yet
#
-# @measuring: the dirtyrate thread is measuring.
+# @measuring: measuring thread is running
#
-# @measured: the dirtyrate thread has measured and results are
-# available.
+# @measured: dirty page rate is measured and the results are available
#
# Since: 5.2
##
@@ -1762,13 +1761,14 @@
##
# @DirtyRateMeasureMode:
#
-# An enumeration of mode of measuring dirtyrate.
+# Method used to measure dirty page rate. Differences between
+# available methods are explained in @calc-dirty-rate.
#
-# @page-sampling: calculate dirtyrate by sampling pages.
+# @page-sampling: use page sampling
#
-# @dirty-ring: calculate dirtyrate by dirty ring.
+# @dirty-ring: use dirty ring
#
-# @dirty-bitmap: calculate dirtyrate by dirty bitmap.
+# @dirty-bitmap: use dirty bitmap
#
# Since: 6.2
##
@@ -1778,25 +1778,24 @@
##
# @DirtyRateInfo:
#
-# Information about current dirty page rate of vm.
+# Information about measured dirty page rate.
#
# @dirty-rate: an estimate of the dirty page rate of the VM in units
-# of MB/s, present only when estimating the rate has completed.
+# of MiB/s. Value is present only when @status is 'measured'.
#
-# @status: status containing dirtyrate query status includes
-# 'unstarted' or 'measuring' or 'measured'
+# @status: current status of dirty page rate measurements
#
# @start-time: start time in units of second for calculation
#
-# @calc-time: time in units of second for sample dirty pages
+# @calc-time: time period for which dirty page rate was measured
+# (in seconds)
#
-# @sample-pages: page count per GB for sample dirty pages the default
-# value is 512 (since 6.1)
+# @sample-pages: number of sampled pages per GiB of guest memory.
+# Valid only in page-sampling mode (Since 6.1)
#
-# @mode: mode containing method of calculate dirtyrate includes
-# 'page-sampling' and 'dirty-ring' (Since 6.2)
+# @mode: mode that was used to measure dirty page rate (Since 6.2)
#
-# @vcpu-dirty-rate: dirtyrate for each vcpu if dirty-ring mode
+# @vcpu-dirty-rate: dirty rate for each vCPU if dirty-ring mode was
# specified (Since 6.2)
#
# Since: 5.2
@@ -1813,15 +1812,49 @@
##
# @calc-dirty-rate:
#
-# start calculating dirty page rate for vm
+# Start measuring dirty page rate of the VM. Results can be retrieved
+# with @query-dirty-rate after measurements are completed.
#
-# @calc-time: time in units of second for sample dirty pages
+# Dirty page rate is the number of pages changed in a given time
+# period expressed in MiB/s. The following methods of calculation are
+# available:
#
-# @sample-pages: page count per GB for sample dirty pages the default
-# value is 512 (since 6.1)
+# 1. In page sampling mode, a random subset of pages are selected and
+# hashed twice: once at the beginning of measurement time period,
+# and once again at the end. If two hashes for some page are
+# different, the page is counted as changed. Since this method
+# relies on sampling and hashing, calculated dirty page rate is
+# only an estimate of its true value. Increasing @sample-pages
+# improves estimation quality at the cost of higher computational
+# overhead.
#
-# @mode: mechanism of calculating dirtyrate includes 'page-sampling'
-# and 'dirty-ring' (Since 6.1)
+# 2. Dirty bitmap mode captures writes to memory (for example by
+# temporarily revoking write access to all pages) and counting page
+# faults. Information about modified pages is collected into a
+# bitmap, where each bit corresponds to one guest page. This mode
+# requires that KVM accelerator property "dirty-ring-size" is *not*
+# set.
+#
+# 3. Dirty ring mode is similar to dirty bitmap mode, but the
+# information about modified pages is collected into ring buffer.
+# This mode tracks page modification per each vCPU separately. It
+# requires that KVM accelerator property "dirty-ring-size" is set.
+#
+# @calc-time: time period in units of second for which dirty page rate
+# is calculated. Note that larger @calc-time values will
+# typically result in smaller dirty page rates because page
+# dirtying is a one-time event. Once some page is counted as
+# dirty during @calc-time period, further writes to this page will
+# not increase dirty page rate anymore.
+#
+# @sample-pages: number of sampled pages per each GiB of guest memory.
+# Default value is 512. For 4KiB guest pages this corresponds to
+# sampling ratio of 0.2%. This argument is used only in page
+# sampling mode. (Since 6.1)
+#
+# @mode: mechanism for tracking dirty pages. Default value is
+# 'page-sampling'. Others are 'dirty-bitmap' and 'dirty-ring'.
+# (Since 6.1)
#
# Since: 5.2
#
@@ -1838,9 +1871,21 @@
##
# @query-dirty-rate:
#
-# query dirty page rate in units of MB/s for vm
+# Query results of the most recent invocation of @calc-dirty-rate.
#
# Since: 5.2
+#
+# Examples:
+#
+# 1. Measurement is in progress:
+#
+# <- {"status": "measuring", "sample-pages": 512,
+# "mode": "page-sampling", "start-time": 3665220, "calc-time": 10}
+#
+# 2. Measurement has been completed:
+#
+# <- {"status": "measured", "sample-pages": 512, "dirty-rate": 108,
+# "mode": "page-sampling", "start-time": 3665220, "calc-time": 10}
##
{ 'command': 'query-dirty-rate', 'returns': 'DirtyRateInfo' }
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PULL 2/2] migration.json: Don't use space before colon
2023-07-10 11:19 [PULL 0/2] QAPI patches patches for 2023-07-10 Markus Armbruster
2023-07-10 11:19 ` [PULL 1/2] qapi: better docs for calc-dirty-rate and friends Markus Armbruster
@ 2023-07-10 11:19 ` Markus Armbruster
2023-07-21 4:48 ` [PULL 0/2] QAPI patches patches for 2023-07-10 Markus Armbruster
2023-07-25 11:44 ` Peter Maydell
3 siblings, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2023-07-10 11:19 UTC (permalink / raw)
To: qemu-devel; +Cc: richard.henderson, Juan Quintela
From: Juan Quintela <quintela@redhat.com>
So all the file is consistent.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230612191604.2219-1-quintela@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
qapi/migration.json | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/qapi/migration.json b/qapi/migration.json
index 52ff5bee98..2a6565a0f8 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -67,13 +67,13 @@
{ 'struct': 'MigrationStats',
'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
- 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
- 'mbps' : 'number', 'dirty-sync-count' : 'int',
- 'postcopy-requests' : 'int', 'page-size' : 'int',
- 'multifd-bytes' : 'uint64', 'pages-per-second' : 'uint64',
- 'precopy-bytes' : 'uint64', 'downtime-bytes' : 'uint64',
- 'postcopy-bytes' : 'uint64',
- 'dirty-sync-missed-zero-copy' : 'uint64' } }
+ 'normal-bytes': 'int', 'dirty-pages-rate': 'int',
+ 'mbps': 'number', 'dirty-sync-count': 'int',
+ 'postcopy-requests': 'int', 'page-size': 'int',
+ 'multifd-bytes': 'uint64', 'pages-per-second': 'uint64',
+ 'precopy-bytes': 'uint64', 'downtime-bytes': 'uint64',
+ 'postcopy-bytes': 'uint64',
+ 'dirty-sync-missed-zero-copy': 'uint64' } }
##
# @XBZRLECacheStats:
@@ -264,7 +264,7 @@
'*cpu-throttle-percentage': 'int',
'*error-desc': 'str',
'*blocked-reasons': ['str'],
- '*postcopy-blocktime' : 'uint32',
+ '*postcopy-blocktime': 'uint32',
'*postcopy-vcpu-blocktime': ['uint32'],
'*compression': 'CompressionStats',
'*socket-address': ['SocketAddress'] } }
@@ -526,7 +526,7 @@
# Since: 1.2
##
{ 'struct': 'MigrationCapabilityStatus',
- 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
+ 'data': { 'capability': 'MigrationCapability', 'state': 'bool' } }
##
# @migrate-set-capabilities:
@@ -1577,7 +1577,7 @@
# Since: 2.9
##
{ 'command': 'xen-set-replication',
- 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' },
+ 'data': { 'enable': 'bool', 'primary': 'bool', '*failover': 'bool' },
'if': 'CONFIG_REPLICATION' }
##
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PULL 0/2] QAPI patches patches for 2023-07-10
2023-07-10 11:19 [PULL 0/2] QAPI patches patches for 2023-07-10 Markus Armbruster
2023-07-10 11:19 ` [PULL 1/2] qapi: better docs for calc-dirty-rate and friends Markus Armbruster
2023-07-10 11:19 ` [PULL 2/2] migration.json: Don't use space before colon Markus Armbruster
@ 2023-07-21 4:48 ` Markus Armbruster
2023-07-24 10:55 ` Markus Armbruster
2023-07-25 11:44 ` Peter Maydell
3 siblings, 1 reply; 6+ messages in thread
From: Markus Armbruster @ 2023-07-21 4:48 UTC (permalink / raw)
To: richard.henderson; +Cc: qemu-devel
Did this fall through the cracks?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PULL 0/2] QAPI patches patches for 2023-07-10
2023-07-21 4:48 ` [PULL 0/2] QAPI patches patches for 2023-07-10 Markus Armbruster
@ 2023-07-24 10:55 ` Markus Armbruster
0 siblings, 0 replies; 6+ messages in thread
From: Markus Armbruster @ 2023-07-24 10:55 UTC (permalink / raw)
To: Peter Maydell; +Cc: richard.henderson, qemu-devel
Markus Armbruster <armbru@redhat.com> writes:
> Did this fall through the cracks?
Hmm, looks like Peter is taking care of merging right now.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PULL 0/2] QAPI patches patches for 2023-07-10
2023-07-10 11:19 [PULL 0/2] QAPI patches patches for 2023-07-10 Markus Armbruster
` (2 preceding siblings ...)
2023-07-21 4:48 ` [PULL 0/2] QAPI patches patches for 2023-07-10 Markus Armbruster
@ 2023-07-25 11:44 ` Peter Maydell
3 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2023-07-25 11:44 UTC (permalink / raw)
To: Markus Armbruster; +Cc: qemu-devel, richard.henderson
On Mon, 10 Jul 2023 at 12:21, Markus Armbruster <armbru@redhat.com> wrote:
>
>
> The following changes since commit 2ff49e96accc8fd9a38e9abd16f0cfa0adab1605:
>
> Merge tag 'pull-tcg-20230709' of https://gitlab.com/rth7680/qemu into staging (2023-07-09 15:01:43 +0100)
>
> are available in the Git repository at:
>
> https://repo.or.cz/qemu/armbru.git tags/pull-qapi-2023-07-10
>
> for you to fetch changes up to fd658a7b8cf1091ae2914655add4511865d7edc0:
>
> migration.json: Don't use space before colon (2023-07-10 07:47:36 +0200)
>
> ----------------------------------------------------------------
> QAPI patches patches for 2023-07-10
>
> ----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/8.1
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-07-25 11:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 11:19 [PULL 0/2] QAPI patches patches for 2023-07-10 Markus Armbruster
2023-07-10 11:19 ` [PULL 1/2] qapi: better docs for calc-dirty-rate and friends Markus Armbruster
2023-07-10 11:19 ` [PULL 2/2] migration.json: Don't use space before colon Markus Armbruster
2023-07-21 4:48 ` [PULL 0/2] QAPI patches patches for 2023-07-10 Markus Armbruster
2023-07-24 10:55 ` Markus Armbruster
2023-07-25 11:44 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.