aboutsummaryrefslogtreecommitdiff
path: root/migration/options.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-05-08 15:08:51 +0200
committerJuan Quintela <quintela@redhat.com>2023-05-15 13:44:07 +0200
commit9d3ebbe21749937f9c9270d0841016e57de3fb92 (patch)
tree13f586512eeadae46c8723ad8184701ae3ea26e2 /migration/options.c
parent52d01d4a5d6963e24ff59af0c39b47fd5d229fb7 (diff)
downloadqemu-9d3ebbe21749937f9c9270d0841016e57de3fb92.zip
qemu-9d3ebbe21749937f9c9270d0841016e57de3fb92.tar.gz
qemu-9d3ebbe21749937f9c9270d0841016e57de3fb92.tar.bz2
migration: We set the rate_limit by a second
That the implementation does the check every 100 milliseconds is an implementation detail that shouldn't be seen on the interfaz. Notice that all callers of qemu_file_set_rate_limit() used the division or pass 0, so this change is a NOP. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20230508130909.65420-4-quintela@redhat.com>
Diffstat (limited to 'migration/options.c')
-rw-r--r--migration/options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/migration/options.c b/migration/options.c
index 7ed88b7..c2a278e 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -1243,7 +1243,7 @@ static void migrate_params_apply(MigrateSetParameters *params, Error **errp)
s->parameters.max_bandwidth = params->max_bandwidth;
if (s->to_dst_file && !migration_in_postcopy()) {
qemu_file_set_rate_limit(s->to_dst_file,
- s->parameters.max_bandwidth / XFER_LIMIT_RATIO);
+ s->parameters.max_bandwidth);
}
}
@@ -1273,7 +1273,7 @@ static void migrate_params_apply(MigrateSetParameters *params, Error **errp)
s->parameters.max_postcopy_bandwidth = params->max_postcopy_bandwidth;
if (s->to_dst_file && migration_in_postcopy()) {
qemu_file_set_rate_limit(s->to_dst_file,
- s->parameters.max_postcopy_bandwidth / XFER_LIMIT_RATIO);
+ s->parameters.max_postcopy_bandwidth);
}
}
if (params->has_max_cpu_throttle) {