[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/16] migration: Use the number of transferred bytes directly
From: |
Juan Quintela |
Subject: |
[PATCH 08/16] migration: Use the number of transferred bytes directly |
Date: |
Tue, 30 May 2023 14:28:05 +0200 |
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.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/migration-stats.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/migration-stats.c b/migration/migration-stats.c
index 79eea8d865..1696185694 100644
--- a/migration/migration-stats.c
+++ b/migration/migration-stats.c
@@ -62,7 +62,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;
--
2.40.1
- [PATCH 16/16] qemu-file: Make qemu_fflush() return errors, (continued)
- [PATCH 16/16] qemu-file: Make qemu_fflush() return errors, Juan Quintela, 2023/05/30
- [PATCH 02/16] migration: Change qemu_file_transferred to noflush, Juan Quintela, 2023/05/30
- [PATCH 06/16] qemu_file: Use a stat64 for qemu_file_transferred, Juan Quintela, 2023/05/30
- [PATCH 03/16] migration: Use qemu_file_transferred_noflush() for block migration., Juan Quintela, 2023/05/30
- [PATCH 13/16] qemu-file: Simplify qemu_file_get_error(), Juan Quintela, 2023/05/30
- [PATCH 05/16] qemu-file: We only call qemu_file_transferred_* on the sending side, Juan Quintela, 2023/05/30
- [PATCH 08/16] migration: Use the number of transferred bytes directly,
Juan Quintela <=
- [PATCH 09/16] qemu_file: Remove unused qemu_file_transferred(), Juan Quintela, 2023/05/30
- [PATCH 04/16] qemu-file: Don't call qemu_fflush() for read only files, Juan Quintela, 2023/05/30
- Re: [PATCH 04/16] qemu-file: Don't call qemu_fflush() for read only files, Juan Quintela, 2023/05/30
[PATCH 10/16] qemu-file: Remove _noflush from qemu_file_transferred_noflush(), Juan Quintela, 2023/05/30