]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
migration: Stop CPU throttling conditionally
authorHyman Huang <yong.huang@smartx.com>
Thu, 17 Oct 2024 06:42:51 +0000 (14:42 +0800)
committerPeter Xu <peterx@redhat.com>
Thu, 31 Oct 2024 19:48:18 +0000 (15:48 -0400)
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>
migration/migration.c

index 7609e0feed2648be4eb89303e3fd220f4ab28970..e81c70b9d275d54796897022b483e34a7a33b2f7 100644 (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) {