[PATCH v4 2/6] migration: Stop CPU throttling conditionally

yong.huang@smartx.com posted 6 patches 5 days, 15 hours ago
[PATCH v4 2/6] migration: Stop CPU throttling conditionally
Posted by yong.huang@smartx.com 5 days, 15 hours ago
From: Hyman Huang <yong.huang@smartx.com>

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

Signed-off-by: Hyman Huang <yong.huang@smartx.com>
---
 migration/migration.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/migration/migration.c b/migration/migration.c
index 021faee2f3..37a200a177 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3289,7 +3289,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) {
-- 
2.27.0
Re: [PATCH v4 2/6] migration: Stop CPU throttling conditionally
Posted by Fabiano Rosas 5 days, 4 hours ago
yong.huang@smartx.com writes:

> From: Hyman Huang <yong.huang@smartx.com>
>
> Since CPU throttling only occurs when auto-converge
> is on, stop it conditionally.
>
> Signed-off-by: Hyman Huang <yong.huang@smartx.com>
> ---
>  migration/migration.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 021faee2f3..37a200a177 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3289,7 +3289,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) {

Reviewed-by: Fabiano Rosas <farosas@suse.de>