mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
abce5fa16d
commit
30fb22cda4
1 changed files with 2 additions and 2 deletions
|
@ -433,8 +433,8 @@ static int multifd_send_pages(QEMUFile *f)
|
||||||
transferred = ((uint64_t) pages->num) * p->page_size + p->packet_len;
|
transferred = ((uint64_t) pages->num) * p->page_size + p->packet_len;
|
||||||
qemu_file_acct_rate_limit(f, transferred);
|
qemu_file_acct_rate_limit(f, transferred);
|
||||||
ram_counters.multifd_bytes += transferred;
|
ram_counters.multifd_bytes += transferred;
|
||||||
stat64_add(&ram_counters.transferred, transferred);
|
|
||||||
qemu_mutex_unlock(&p->mutex);
|
qemu_mutex_unlock(&p->mutex);
|
||||||
|
stat64_add(&ram_counters.transferred, transferred);
|
||||||
qemu_sem_post(&p->sem);
|
qemu_sem_post(&p->sem);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -628,8 +628,8 @@ int multifd_send_sync_main(QEMUFile *f)
|
||||||
p->pending_job++;
|
p->pending_job++;
|
||||||
qemu_file_acct_rate_limit(f, p->packet_len);
|
qemu_file_acct_rate_limit(f, p->packet_len);
|
||||||
ram_counters.multifd_bytes += p->packet_len;
|
ram_counters.multifd_bytes += p->packet_len;
|
||||||
stat64_add(&ram_counters.transferred, p->packet_len);
|
|
||||||
qemu_mutex_unlock(&p->mutex);
|
qemu_mutex_unlock(&p->mutex);
|
||||||
|
stat64_add(&ram_counters.transferred, p->packet_len);
|
||||||
qemu_sem_post(&p->sem);
|
qemu_sem_post(&p->sem);
|
||||||
}
|
}
|
||||||
for (i = 0; i < migrate_multifd_channels(); i++) {
|
for (i = 0; i < migrate_multifd_channels(); i++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue