[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 44/65] ram: Add page-size to output in 'info migrate'
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 44/65] ram: Add page-size to output in 'info migrate' |
Date: |
Fri, 21 Apr 2017 13:56:25 +0200 |
From: Chao Fan <address@hidden>
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 <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
hmp.c | 3 +++
migration/migration.c | 1 +
qapi-schema.json | 5 ++++-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/hmp.c b/hmp.c
index edb8970..be75e71 100644
--- 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);
diff --git a/migration/migration.c b/migration/migration.c
index 92a3754..156daf9 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -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();
diff --git a/qapi-schema.json b/qapi-schema.json
index 250e4dc..01b087f 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -598,6 +598,9 @@
# @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',
@@ -605,7 +608,7 @@
'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:
--
2.9.3
- [Qemu-devel] [PULL 34/65] ram: Create ram_dirty_sync_count(), (continued)
- [Qemu-devel] [PULL 34/65] ram: Create ram_dirty_sync_count(), Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 35/65] ram: Remove dirty_bytes_rate, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 36/65] ram: Move dirty_pages_rate to RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 37/65] ram: Move postcopy_requests into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 38/65] ram: Add QEMUFile to RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 39/65] ram: Move QEMUFile into RAMState, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 40/65] ram: Remove compression_switch and inline its logic, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 41/65] migration: Remove MigrationState from migration_in_postcopy, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 42/65] ram: We don't need MigrationState parameter anymore, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 43/65] ram: Rename qemu_target_page_bits() to qemu_target_page_size(), Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 44/65] ram: Add page-size to output in 'info migrate',
Juan Quintela <=
- [Qemu-devel] [PULL 45/65] ram: Pass RAMBlock to bitmap_sync, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 46/65] ram: ram_discard_range() don't use the mis parameter, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 47/65] ram: reorganize last_sent_block, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 48/65] ram: Use page number instead of an address for the bitmap operations, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 49/65] ram: Remember last_page instead of last_offset, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 50/65] ram: Change offset field in PageSearchStatus to page, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 52/65] ram: rename last_ram_offset() last_ram_pages(), Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 54/65] migration: Remove MigrationState parameter from migration_is_idle(), Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 51/65] ram: Use ramblock and page offset instead of absolute offset, Juan Quintela, 2017/04/21
- [Qemu-devel] [PULL 53/65] ram: Use RAMBitmap type for coherence, Juan Quintela, 2017/04/21