mirror of https://github.com/xemu-project/xemu.git
migration: A rate limit value of 0 is valid
And it is the best way to not have rate_limit. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20230508130909.65420-2-quintela@redhat.com>
This commit is contained in:
parent
dc2836c380
commit
52d01d4a5d
|
@ -2140,12 +2140,7 @@ static int postcopy_start(MigrationState *ms)
|
||||||
* will notice we're in POSTCOPY_ACTIVE and not actually
|
* will notice we're in POSTCOPY_ACTIVE and not actually
|
||||||
* wrap their state up here
|
* wrap their state up here
|
||||||
*/
|
*/
|
||||||
/* 0 max-postcopy-bandwidth means unlimited */
|
|
||||||
if (!bandwidth) {
|
|
||||||
qemu_file_set_rate_limit(ms->to_dst_file, INT64_MAX);
|
|
||||||
} else {
|
|
||||||
qemu_file_set_rate_limit(ms->to_dst_file, bandwidth / XFER_LIMIT_RATIO);
|
qemu_file_set_rate_limit(ms->to_dst_file, bandwidth / XFER_LIMIT_RATIO);
|
||||||
}
|
|
||||||
if (migrate_postcopy_ram()) {
|
if (migrate_postcopy_ram()) {
|
||||||
/* Ping just for debugging, helps line traces up */
|
/* Ping just for debugging, helps line traces up */
|
||||||
qemu_savevm_send_ping(ms->to_dst_file, 2);
|
qemu_savevm_send_ping(ms->to_dst_file, 2);
|
||||||
|
|
Loading…
Reference in New Issue