Commit 8504ddec authored by Peter Xu's avatar Peter Xu Committed by Dr. David Alan Gilbert
Browse files

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: default avatarXiaohui Li <xiaohli@redhat.com>
Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
Message-Id: <20190906130103.20961-1-peterx@redhat.com>
Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
parent 3af31a34
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;