[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/3] Add zero-copy-copied migration stat
From: |
Leonardo Bras |
Subject: |
[PATCH v2 2/3] Add zero-copy-copied migration stat |
Date: |
Fri, 1 Jul 2022 12:59:35 -0300 |
Signed-off-by: Leonardo Bras <leobras@redhat.com>
---
qapi/migration.json | 5 ++++-
migration/migration.c | 1 +
monitor/hmp-cmds.c | 4 ++++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/qapi/migration.json b/qapi/migration.json
index 7102e474a6..925f009868 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -55,6 +55,9 @@
# @postcopy-bytes: The number of bytes sent during the post-copy phase
# (since 7.0).
#
+# @zero-copy-copied: The number of zero-copy flushes that reported data sent
+# using zero-copy that ended up being copied. (since 7.2)
+#
# Since: 0.14
##
{ 'struct': 'MigrationStats',
@@ -65,7 +68,7 @@
'postcopy-requests' : 'int', 'page-size' : 'int',
'multifd-bytes' : 'uint64', 'pages-per-second' : 'uint64',
'precopy-bytes' : 'uint64', 'downtime-bytes' : 'uint64',
- 'postcopy-bytes' : 'uint64' } }
+ 'postcopy-bytes' : 'uint64', 'zero-copy-copied' : 'uint64' } }
##
# @XBZRLECacheStats:
diff --git a/migration/migration.c b/migration/migration.c
index 78f5057373..68fc3894ba 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1034,6 +1034,7 @@ static void populate_ram_info(MigrationInfo *info,
MigrationState *s)
info->ram->precopy_bytes = ram_counters.precopy_bytes;
info->ram->downtime_bytes = ram_counters.downtime_bytes;
info->ram->postcopy_bytes = ram_counters.postcopy_bytes;
+ info->ram->zero_copy_copied = ram_counters.zero_copy_copied;
if (migrate_use_xbzrle()) {
info->has_xbzrle_cache = true;
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index ca98df0495..bcb1799543 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -307,6 +307,10 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "postcopy ram: %" PRIu64 " kbytes\n",
info->ram->postcopy_bytes >> 10);
}
+ if (info->ram->zero_copy_copied) {
+ monitor_printf(mon, "zero-copy copied: %" PRIu64 " iterations\n",
+ info->ram->zero_copy_copied);
+ }
}
if (info->has_disk) {
--
2.36.1
- [PATCH v2 0/3] Zero copy improvements (QIOChannel + multifd), Leonardo Bras, 2022/07/01
- [PATCH v2 1/3] QIOChannelSocket: Fix zero-copy flush returning code 1 when nothing sent, Leonardo Bras, 2022/07/01
- [PATCH v2 2/3] Add zero-copy-copied migration stat,
Leonardo Bras <=
- Re: [PATCH v2 2/3] Add zero-copy-copied migration stat, Markus Armbruster, 2022/07/04
- Re: [PATCH v2 2/3] Add zero-copy-copied migration stat, Daniel P . Berrangé, 2022/07/04
- Re: [PATCH v2 2/3] Add zero-copy-copied migration stat, Markus Armbruster, 2022/07/04
- Re: [PATCH v2 2/3] Add zero-copy-copied migration stat, Dr. David Alan Gilbert, 2022/07/04
- Re: [PATCH v2 2/3] Add zero-copy-copied migration stat, Markus Armbruster, 2022/07/04
- Re: [PATCH v2 2/3] Add zero-copy-copied migration stat, Daniel P . Berrangé, 2022/07/04
- Re: [PATCH v2 2/3] Add zero-copy-copied migration stat, Markus Armbruster, 2022/07/04
- Re: [PATCH v2 2/3] Add zero-copy-copied migration stat, Daniel P . Berrangé, 2022/07/04
- Re: [PATCH v2 2/3] Add zero-copy-copied migration stat, Leonardo Brás, 2022/07/04
- Re: [PATCH v2 2/3] Add zero-copy-copied migration stat, Markus Armbruster, 2022/07/05