[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/12] migration: Use the number of transferred bytes directl
From: |
Fabiano Rosas |
Subject: |
Re: [PATCH 04/12] migration: Use the number of transferred bytes directly |
Date: |
Tue, 24 Oct 2023 14:40:01 -0300 |
Juan Quintela <quintela@redhat.com> writes:
> 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 4cc989d975..1d9197b4c3 100644
> --- a/migration/migration-stats.c
> +++ b/migration/migration-stats.c
> @@ -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;
Reviewed-by: Fabiano Rosas <farosas@suse.de>
- [PATCH 00/12] migration: Yet another round of atomic counters, Juan Quintela, 2023/10/24
- [PATCH 01/12] qemu-file: We only call qemu_file_transferred_* on the sending side, Juan Quintela, 2023/10/24
- [PATCH 05/12] qemu_file: Remove unused qemu_file_transferred(), Juan Quintela, 2023/10/24
- [PATCH 04/12] migration: Use the number of transferred bytes directly, Juan Quintela, 2023/10/24
- Re: [PATCH 04/12] migration: Use the number of transferred bytes directly,
Fabiano Rosas <=
- [PATCH 02/12] qemu_file: Use a stat64 for qemu_file_transferred, Juan Quintela, 2023/10/24
- [PATCH 03/12] qemu_file: total_transferred is not used anymore, Juan Quintela, 2023/10/24
- [PATCH 09/12] qemu-file: Simplify qemu_file_get_error(), Juan Quintela, 2023/10/24
- [PATCH 11/12] migration: Remove transferred atomic counter, Juan Quintela, 2023/10/24
- [PATCH 08/12] migration: migration_rate_limit_reset() don't need the QEMUFile, Juan Quintela, 2023/10/24