migration: Stop CPU throttling conditionally

Since CPU throttling only occurs when auto-converge
is on, stop it conditionally.

Signed-off-by: Hyman Huang <yong.huang@smartx.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/f0c787080bb9ab0c37952f0ca5bfaa525d5ddd14.1729146786.git.yong.huang@smartx.com
Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
Hyman Huang 2024-10-17 14:42:51 +08:00 committed by Peter Xu
parent 8c58e2d5ba
commit 054e5d66e5

View File

@ -3295,7 +3295,9 @@ static MigIterateState migration_iteration_run(MigrationState *s)
static void migration_iteration_finish(MigrationState *s)
{
/* If we enabled cpu throttling for auto-converge, turn it off. */
cpu_throttle_stop();
if (migrate_auto_converge()) {
cpu_throttle_stop();
}
bql_lock();
switch (s->state) {