diff options
author | Juan Quintela <quintela@redhat.com> | 2022-11-24 17:26:19 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-04-24 11:28:56 +0200 |
commit | 30fb22cda45bea43a3c0e26049ebdd71a9503ffd (patch) | |
tree | fcfae4f1b6131f175791b93b514b8620b2bd5e85 /migration/multifd.c | |
parent | abce5fa16d126ed085ccf8a5b3fe61a1efa20994 (diff) |
migration: Update atomic stats out of the mutex
Reviewed-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
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 01fab01a92..6ef3a27938 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -433,8 +433,8 @@ 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_counters.transferred, transferred); qemu_mutex_unlock(&p->mutex); + stat64_add(&ram_counters.transferred, transferred); qemu_sem_post(&p->sem); return 1; @@ -628,8 +628,8 @@ 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_counters.transferred, p->packet_len); qemu_mutex_unlock(&p->mutex); + stat64_add(&ram_counters.transferred, p->packet_len); qemu_sem_post(&p->sem); } for (i = 0; i < migrate_multifd_channels(); i++) { |