From 054e5d66e53e48f842c1cce61dc1b714fe9bf0ee Mon Sep 17 00:00:00 2001 From: Hyman Huang Date: Thu, 17 Oct 2024 14:42:51 +0800 Subject: [PATCH] migration: Stop CPU throttling conditionally Since CPU throttling only occurs when auto-converge is on, stop it conditionally. Signed-off-by: Hyman Huang Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/f0c787080bb9ab0c37952f0ca5bfaa525d5ddd14.1729146786.git.yong.huang@smartx.com Signed-off-by: Peter Xu --- migration/migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 7609e0feed..e81c70b9d2 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -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) {