diff options
author | Juan Quintela <quintela@redhat.com> | 2023-02-22 15:56:45 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-04-24 11:28:56 +0200 |
commit | abce5fa16d126ed085ccf8a5b3fe61a1efa20994 (patch) | |
tree | 03e5967a1765f4595d181c3da29b7bc72244c72d /migration/ram.h | |
parent | 8ebb6ecc3798e66a9ba98355983762bedfa1b72d (diff) |
migration: Merge ram_counters and ram_atomic_counters
Using MgrationStats as type for ram_counters mean that we didn't have
to re-declare each value in another struct. The need of atomic
counters have make us to create MigrationAtomicStats for this atomic
counters.
Create RAMStats type which is a merge of MigrationStats and
MigrationAtomicStats removing unused members.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
Fix typos found by David Edmondson
Diffstat (limited to 'migration/ram.h')
-rw-r--r-- | migration/ram.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/migration/ram.h b/migration/ram.h index 81cbb0947c..7c026b5242 100644 --- a/migration/ram.h +++ b/migration/ram.h @@ -35,25 +35,27 @@ #include "qemu/stats64.h" /* - * These are the migration statistic counters that need to be updated using - * atomic ops (can be accessed by more than one thread). Here since we - * cannot modify MigrationStats directly to use Stat64 as it was defined in - * the QAPI scheme, we define an internal structure to hold them, and we - * propagate the real values when QMP queries happen. - * - * IOW, the corresponding fields within ram_counters on these specific - * fields will be always zero and not being used at all; they're just - * placeholders to make it QAPI-compatible. + * These are the ram migration statistic counters. It is loosely + * based on MigrationStats. We change to Stat64 any counter that + * needs to be updated using atomic ops (can be accessed by more than + * one thread). */ typedef struct { - Stat64 transferred; + int64_t dirty_pages_rate; + int64_t dirty_sync_count; + uint64_t dirty_sync_missed_zero_copy; + uint64_t downtime_bytes; Stat64 duplicate; + uint64_t multifd_bytes; Stat64 normal; Stat64 postcopy_bytes; -} MigrationAtomicStats; + int64_t postcopy_requests; + uint64_t precopy_bytes; + int64_t remaining; + Stat64 transferred; +} RAMStats; -extern MigrationAtomicStats ram_atomic_counters; -extern MigrationStats ram_counters; +extern RAMStats ram_counters; extern XBZRLECacheStats xbzrle_counters; extern CompressionStats compression_counters; |