]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ram: Add page-size to output in 'info migrate'
authorChao Fan <fanc.fnst@cn.fujitsu.com>
Tue, 21 Mar 2017 02:22:43 +0000 (10:22 +0800)
committerJuan Quintela <quintela@redhat.com>
Fri, 21 Apr 2017 10:25:39 +0000 (12:25 +0200)
The number of dirty pages is output in 'pages' in the command
'info migrate', so add page-size to calculate the number of dirty
pages in bytes.

Signed-off-by: Chao Fan <fanc.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
hmp.c
migration/migration.c
qapi-schema.json

diff --git a/hmp.c b/hmp.c
index edb8970461fb63b7b55e0a3a5338e148d119d4c1..be75e7118cf6a2630eb37102f4490caab835ed91 100644 (file)
--- a/hmp.c
+++ b/hmp.c
@@ -215,6 +215,9 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
                        info->ram->normal_bytes >> 10);
         monitor_printf(mon, "dirty sync count: %" PRIu64 "\n",
                        info->ram->dirty_sync_count);
+        monitor_printf(mon, "page size: %" PRIu64 " kbytes\n",
+                       info->ram->page_size >> 10);
+
         if (info->ram->dirty_pages_rate) {
             monitor_printf(mon, "dirty pages rate: %" PRIu64 " pages\n",
                            info->ram->dirty_pages_rate);
index 92a37549230c2ff3e50b5f9ef774a6772ffddc6a..156daf976f3f2b38a468e91e0d7de4f1af3ffef2 100644 (file)
@@ -658,6 +658,7 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s)
     info->ram->mbps = s->mbps;
     info->ram->dirty_sync_count = ram_dirty_sync_count();
     info->ram->postcopy_requests = ram_postcopy_requests();
+    info->ram->page_size = qemu_target_page_size();
 
     if (s->state != MIGRATION_STATUS_COMPLETED) {
         info->ram->remaining = ram_bytes_remaining();
index 250e4dc49b7f8b8c9f5364bdeec152a3b48cab90..01b087fa163500243d2a783228ec7611fc2f0f38 100644 (file)
 # @postcopy-requests: The number of page requests received from the destination
 #        (since 2.7)
 #
+# @page-size: The number of bytes per page for the various page-based
+#        statistics (since 2.10)
+#
 # Since: 0.14.0
 ##
 { 'struct': 'MigrationStats',
            'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
            'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
            'mbps' : 'number', 'dirty-sync-count' : 'int',
-           'postcopy-requests' : 'int' } }
+           'postcopy-requests' : 'int', 'page-size' : 'int' } }
 
 ##
 # @XBZRLECacheStats: