diff options
author | Peter Xu | 2019-09-06 15:01:03 +0200 |
---|---|---|
committer | Dr. David Alan Gilbert | 2019-09-12 12:21:25 +0200 |
commit | 8504ddeca0d1f592877dba8dc0db44b4d7fd8c52 (patch) | |
tree | a851ab0fe49ada1d53dff603b5ca8cbb8b0414d9 | |
parent | tests/migration: Add a test for validate-uuid capability (diff) | |
download | qemu-8504ddeca0d1f592877dba8dc0db44b4d7fd8c52.tar.gz qemu-8504ddeca0d1f592877dba8dc0db44b4d7fd8c52.tar.xz qemu-8504ddeca0d1f592877dba8dc0db44b4d7fd8c52.zip |
migration: Fix postcopy bw for recovery
We've got max-postcopy-bandwidth parameter but it's not applied
correctly after a postcopy recovery so the recovered migration stream
will still eat the whole net bandwidth. Fix that up.
Reported-by: Xiaohui Li <xiaohli@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20190906130103.20961-1-peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
-rw-r--r-- | migration/migration.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/migration/migration.c b/migration/migration.c index 2391a8d418..e45270c23b 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -3336,7 +3336,8 @@ void migrate_fd_connect(MigrationState *s, Error *error_in) if (resume) { /* This is a resumed migration */ - rate_limit = INT64_MAX; + rate_limit = s->parameters.max_postcopy_bandwidth / + XFER_LIMIT_RATIO; } else { /* This is a fresh new migration */ rate_limit = s->parameters.max_bandwidth / XFER_LIMIT_RATIO; |