[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 11/20] migration: migration_rate_limit_reset() don't need the
From: |
Juan Quintela |
Subject: |
[PATCH v2 11/20] migration: migration_rate_limit_reset() don't need the QEMUFile |
Date: |
Tue, 30 May 2023 20:39:32 +0200 |
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/migration-stats.h | 4 +---
migration/migration-stats.c | 2 +-
migration/migration.c | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/migration/migration-stats.h b/migration/migration-stats.h
index e3863bf9bb..68f3939188 100644
--- a/migration/migration-stats.h
+++ b/migration/migration-stats.h
@@ -120,10 +120,8 @@ uint64_t migration_rate_get(void);
* migration_rate_reset: Reset the rate limit counter.
*
* This is called when we know we start a new transfer cycle.
- *
- * @f: QEMUFile used for main migration channel
*/
-void migration_rate_reset(QEMUFile *f);
+void migration_rate_reset(void);
/**
* migration_rate_set: Set the maximum amount that can be transferred.
diff --git a/migration/migration-stats.c b/migration/migration-stats.c
index a5f3fcc5ae..df541fa904 100644
--- a/migration/migration-stats.c
+++ b/migration/migration-stats.c
@@ -53,7 +53,7 @@ void migration_rate_set(uint64_t limit)
stat64_set(&mig_stats.rate_limit_max, limit / XFER_LIMIT_RATIO);
}
-void migration_rate_reset(QEMUFile *f)
+void migration_rate_reset(void)
{
stat64_set(&mig_stats.rate_limit_start, migration_transferred_bytes());
}
diff --git a/migration/migration.c b/migration/migration.c
index 24e55c5bf3..ab8254e433 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2693,7 +2693,7 @@ static void migration_update_counters(MigrationState *s,
stat64_get(&mig_stats.dirty_bytes_last_sync) / bandwidth;
}
- migration_rate_reset(s->to_dst_file);
+ migration_rate_reset();
update_iteration_initial_status(s);
--
2.40.1
- [PATCH v2 02/20] migration: Change qemu_file_transferred to noflush, (continued)
- [PATCH v2 02/20] migration: Change qemu_file_transferred to noflush, Juan Quintela, 2023/05/30
- [PATCH v2 01/20] qemu-file: Rename qemu_file_transferred_ fast -> noflush, Juan Quintela, 2023/05/30
- [PATCH v2 04/20] qemu-file: We only call qemu_file_transferred_* on the sending side, Juan Quintela, 2023/05/30
- [PATCH v2 03/20] migration: Use qemu_file_transferred_noflush() for block migration., Juan Quintela, 2023/05/30
- [PATCH v2 05/20] qemu_file: Use a stat64 for qemu_file_transferred, Juan Quintela, 2023/05/30
- [PATCH v2 07/20] migration: Use the number of transferred bytes directly, Juan Quintela, 2023/05/30
- [PATCH v2 06/20] qemu_file: total_transferred is not used anymore, Juan Quintela, 2023/05/30
- [PATCH v2 08/20] qemu_file: Remove unused qemu_file_transferred(), Juan Quintela, 2023/05/30
- [PATCH v2 09/20] qemu-file: Remove _noflush from qemu_file_transferred_noflush(), Juan Quintela, 2023/05/30
- [PATCH v2 10/20] migration: migration_transferred_bytes() don't need the QEMUFile, Juan Quintela, 2023/05/30
- [PATCH v2 11/20] migration: migration_rate_limit_reset() don't need the QEMUFile,
Juan Quintela <=
- [PATCH v2 13/20] migration: Use migration_transferred_bytes(), Juan Quintela, 2023/05/30
- [PATCH v2 12/20] qemu-file: Simplify qemu_file_get_error(), Juan Quintela, 2023/05/30
- [PATCH v2 14/20] migration: Remove transferred atomic counter, Juan Quintela, 2023/05/30
- [PATCH v2 15/20] qemu-file: Make qemu_fflush() return errors, Juan Quintela, 2023/05/30
- [PATCH v2 18/20] qemu_file: Make qemu_file_is_writable() static, Juan Quintela, 2023/05/30
- [PATCH v2 19/20] qemu-file: Simplify qemu_file_shutdown(), Juan Quintela, 2023/05/30
- [PATCH v2 20/20] qemu-file: Make qemu_file_get_error_obj() static, Juan Quintela, 2023/05/30
- [PATCH v2 16/20] migration/rdma: Split qemu_fopen_rdma() into input/output functions, Juan Quintela, 2023/05/30
- [PATCH v2 17/20] qemu-file: Remove unused qemu_file_mode_is_not_valid(), Juan Quintela, 2023/05/30
- Re: [PATCH v2 00/20] Next round of migration atomic counters, Fiona Ebner, 2023/05/31