|
|
29b115 |
From ac346634c5731407baa9de709dbd4d5cc6f45301 Mon Sep 17 00:00:00 2001
|
|
|
29b115 |
From: Leonardo Bras <leobras@redhat.com>
|
|
|
29b115 |
Date: Mon, 11 Jul 2022 18:11:12 -0300
|
|
|
29b115 |
Subject: [PATCH 02/11] Add dirty-sync-missed-zero-copy migration stat
|
|
|
29b115 |
MIME-Version: 1.0
|
|
|
29b115 |
Content-Type: text/plain; charset=UTF-8
|
|
|
29b115 |
Content-Transfer-Encoding: 8bit
|
|
|
29b115 |
|
|
|
29b115 |
RH-Author: Leonardo Brás <leobras@redhat.com>
|
|
|
29b115 |
RH-MergeRequest: 111: zero-copy-send fixes & improvements
|
|
|
29b115 |
RH-Commit: [2/6] 115035fd0a4e4b9439c91fb0f5d1a2f9244ba369 (LeoBras/centos-qemu-kvm)
|
|
|
29b115 |
RH-Bugzilla: 2107466
|
|
|
29b115 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
29b115 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
29b115 |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
29b115 |
|
|
|
29b115 |
Signed-off-by: Leonardo Bras <leobras@redhat.com>
|
|
|
29b115 |
Acked-by: Markus Armbruster <armbru@redhat.com>
|
|
|
29b115 |
Acked-by: Peter Xu <peterx@redhat.com>
|
|
|
29b115 |
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
29b115 |
Message-Id: <20220711211112.18951-3-leobras@redhat.com>
|
|
|
29b115 |
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
29b115 |
(cherry picked from commit cf20c897338067ab4b70a4596fdccaf90c7e29a1)
|
|
|
29b115 |
Signed-off-by: Leonardo Bras <leobras@redhat.com>
|
|
|
29b115 |
---
|
|
|
29b115 |
migration/migration.c | 2 ++
|
|
|
29b115 |
monitor/hmp-cmds.c | 5 +++++
|
|
|
29b115 |
qapi/migration.json | 7 ++++++-
|
|
|
29b115 |
3 files changed, 13 insertions(+), 1 deletion(-)
|
|
|
29b115 |
|
|
|
29b115 |
diff --git a/migration/migration.c b/migration/migration.c
|
|
|
29b115 |
index 8fb3eae910..3a3a7a4a50 100644
|
|
|
29b115 |
--- a/migration/migration.c
|
|
|
29b115 |
+++ b/migration/migration.c
|
|
|
29b115 |
@@ -1017,6 +1017,8 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s)
|
|
|
29b115 |
info->ram->normal_bytes = ram_counters.normal * page_size;
|
|
|
29b115 |
info->ram->mbps = s->mbps;
|
|
|
29b115 |
info->ram->dirty_sync_count = ram_counters.dirty_sync_count;
|
|
|
29b115 |
+ info->ram->dirty_sync_missed_zero_copy =
|
|
|
29b115 |
+ ram_counters.dirty_sync_missed_zero_copy;
|
|
|
29b115 |
info->ram->postcopy_requests = ram_counters.postcopy_requests;
|
|
|
29b115 |
info->ram->page_size = page_size;
|
|
|
29b115 |
info->ram->multifd_bytes = ram_counters.multifd_bytes;
|
|
|
29b115 |
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
|
|
|
29b115 |
index 634968498b..9cec01de38 100644
|
|
|
29b115 |
--- a/monitor/hmp-cmds.c
|
|
|
29b115 |
+++ b/monitor/hmp-cmds.c
|
|
|
29b115 |
@@ -305,6 +305,11 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
|
|
|
29b115 |
monitor_printf(mon, "postcopy ram: %" PRIu64 " kbytes\n",
|
|
|
29b115 |
info->ram->postcopy_bytes >> 10);
|
|
|
29b115 |
}
|
|
|
29b115 |
+ if (info->ram->dirty_sync_missed_zero_copy) {
|
|
|
29b115 |
+ monitor_printf(mon,
|
|
|
29b115 |
+ "Zero-copy-send fallbacks happened: %" PRIu64 " times\n",
|
|
|
29b115 |
+ info->ram->dirty_sync_missed_zero_copy);
|
|
|
29b115 |
+ }
|
|
|
29b115 |
}
|
|
|
29b115 |
|
|
|
29b115 |
if (info->has_disk) {
|
|
|
29b115 |
diff --git a/qapi/migration.json b/qapi/migration.json
|
|
|
29b115 |
index 5105790cd0..9b38b3c21c 100644
|
|
|
29b115 |
--- a/qapi/migration.json
|
|
|
29b115 |
+++ b/qapi/migration.json
|
|
|
29b115 |
@@ -55,6 +55,10 @@
|
|
|
29b115 |
# @postcopy-bytes: The number of bytes sent during the post-copy phase
|
|
|
29b115 |
# (since 7.0).
|
|
|
29b115 |
#
|
|
|
29b115 |
+# @dirty-sync-missed-zero-copy: Number of times dirty RAM synchronization could
|
|
|
29b115 |
+# not avoid copying dirty pages. This is between
|
|
|
29b115 |
+# 0 and @dirty-sync-count * @multifd-channels.
|
|
|
29b115 |
+# (since 7.1)
|
|
|
29b115 |
# Since: 0.14
|
|
|
29b115 |
##
|
|
|
29b115 |
{ 'struct': 'MigrationStats',
|
|
|
29b115 |
@@ -65,7 +69,8 @@
|
|
|
29b115 |
'postcopy-requests' : 'int', 'page-size' : 'int',
|
|
|
29b115 |
'multifd-bytes' : 'uint64', 'pages-per-second' : 'uint64',
|
|
|
29b115 |
'precopy-bytes' : 'uint64', 'downtime-bytes' : 'uint64',
|
|
|
29b115 |
- 'postcopy-bytes' : 'uint64' } }
|
|
|
29b115 |
+ 'postcopy-bytes' : 'uint64',
|
|
|
29b115 |
+ 'dirty-sync-missed-zero-copy' : 'uint64' } }
|
|
|
29b115 |
|
|
|
29b115 |
##
|
|
|
29b115 |
# @XBZRLECacheStats:
|
|
|
29b115 |
--
|
|
|
29b115 |
2.31.1
|
|
|
29b115 |
|