aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorHyman Huang <yong.huang@smartx.com>2024-10-17 14:42:51 +0800
committerPeter Xu <peterx@redhat.com>2024-10-31 15:48:18 -0400
commit054e5d66e53e48f842c1cce61dc1b714fe9bf0ee (patch)
tree6aaff05a0e13eba7ed9e5affab1536655f251b51 /migration
parent8c58e2d5ba405dc23865d989647a2fe10eec4402 (diff)
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>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c4
1 files changed, 3 insertions, 1 deletions
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) {