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/multifd.c | |
parent | 8ebb6ecc3798e66a9ba98355983762bedfa1b72d (diff) | |
download | qemu-abce5fa16d126ed085ccf8a5b3fe61a1efa20994.zip qemu-abce5fa16d126ed085ccf8a5b3fe61a1efa20994.tar.gz qemu-abce5fa16d126ed085ccf8a5b3fe61a1efa20994.tar.bz2 |
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/multifd.c')
-rw-r--r-- | migration/multifd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/multifd.c b/migration/multifd.c index cbc0dfe..01fab01a9 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -433,7 +433,7 @@ static int multifd_send_pages(QEMUFile *f) transferred = ((uint64_t) pages->num) * p->page_size + p->packet_len; qemu_file_acct_rate_limit(f, transferred); ram_counters.multifd_bytes += transferred; - stat64_add(&ram_atomic_counters.transferred, transferred); + stat64_add(&ram_counters.transferred, transferred); qemu_mutex_unlock(&p->mutex); qemu_sem_post(&p->sem); @@ -628,7 +628,7 @@ int multifd_send_sync_main(QEMUFile *f) p->pending_job++; qemu_file_acct_rate_limit(f, p->packet_len); ram_counters.multifd_bytes += p->packet_len; - stat64_add(&ram_atomic_counters.transferred, p->packet_len); + stat64_add(&ram_counters.transferred, p->packet_len); qemu_mutex_unlock(&p->mutex); qemu_sem_post(&p->sem); } |