[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/15] migration/postcopy: Update the bandwidth durin
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 15/15] migration/postcopy: Update the bandwidth during postcopy |
Date: |
Mon, 25 Mar 2019 18:47:06 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
The recently added max-postcopy-bandwidth parameter is only read
at the transition from precopy->postcopy where as the older
max-bandwidth parameter updates the migration bandwidth when changed
even if the migration is already running.
Fix this discrepency so that:
a) You can change the bandwidth during postcopy by setting
max-postcopy-bandwidth
b) Changing max-bandwidth during postcopy has no effect
(it currently changes the postcopy bandwidth which isn't
expected).
Fixes: 7e555c6c
bz: https://bugzilla.redhat.com/show_bug.cgi?id=1686321
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
migration/migration.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/migration/migration.c b/migration/migration.c
index d5c218a22b..69f75124c9 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1341,7 +1341,7 @@ static void migrate_params_apply(MigrateSetParameters
*params, Error **errp)
if (params->has_max_bandwidth) {
s->parameters.max_bandwidth = params->max_bandwidth;
- if (s->to_dst_file) {
+ if (s->to_dst_file && !migration_in_postcopy()) {
qemu_file_set_rate_limit(s->to_dst_file,
s->parameters.max_bandwidth /
XFER_LIMIT_RATIO);
}
@@ -1370,6 +1370,10 @@ static void migrate_params_apply(MigrateSetParameters
*params, Error **errp)
}
if (params->has_max_postcopy_bandwidth) {
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);
+ }
}
if (params->has_max_cpu_throttle) {
s->parameters.max_cpu_throttle = params->max_cpu_throttle;
--
2.20.1
- [Qemu-devel] [PULL 00/15] Migration patches, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 15/15] migration/postcopy: Update the bandwidth during postcopy,
Juan Quintela <=
- [Qemu-devel] [PULL 13/15] Migration/colo.c: Add the necessary checks for colo_do_failover, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 14/15] Migration/colo.c: Make user obtain the last COLO mode info after failover, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 09/15] migration: add support for a "tls-authz" migration parameter, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 10/15] migration/rdma: Check qemu_rdma_init_one_block, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 07/15] multifd: Add some padding, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 02/15] multifd: Rename "size" member to pages_alloc, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 12/15] Migration/colo.c: Add new COLOExitReason to handle all failover state, Juan Quintela, 2019/03/25
- [Qemu-devel] [PULL 11/15] Migration/colo.c: Fix COLO failover status error, Juan Quintela, 2019/03/25