Skip to content

Commit

Permalink
migration: Use the number of transferred bytes directly
Browse files Browse the repository at this point in the history
We only use migration_transferred_bytes() to calculate the rate_limit,
for that we don't need to flush whatever is on the qemu_file buffer.
Remember that the buffer is really small (normal case is 32K if we use
iov's can be 64 * TARGET_PAGE_SIZE), so this is not relevant to
calculations.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231025091117.6342-5-quintela@redhat.com>
  • Loading branch information
Juan Quintela committed Oct 31, 2023
1 parent 5e26521 commit 737840e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migration/migration-stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ uint64_t migration_transferred_bytes(QEMUFile *f)
{
uint64_t multifd = stat64_get(&mig_stats.multifd_bytes);
uint64_t rdma = stat64_get(&mig_stats.rdma_bytes);
uint64_t qemu_file = qemu_file_transferred(f);
uint64_t qemu_file = stat64_get(&mig_stats.qemu_file_transferred);

trace_migration_transferred_bytes(qemu_file, multifd, rdma);
return qemu_file + multifd + rdma;
Expand Down

0 comments on commit 737840e

Please sign in to comment.