diff mbox series

[PULL,15/17] system/dirtylimit: Don't use migration_is_active()

Message ID 20241224151547.386529-16-clg@redhat.com (mailing list archive)
State New
Headers show
Series [PULL,01/17] vfio/igd: fix GTT stolen memory size calculation for gen 8+ | expand

Commit Message

Cédric Le Goater Dec. 24, 2024, 3:15 p.m. UTC
From: Avihai Horon <avihaih@nvidia.com>

vcpu_dirty_rate_stat_collect() uses migration_is_active() to detect
whether migration is running or not, in order to get the correct dirty
rate period value.

However, recently there has been an effort to simplify the migration
status API and reduce it to a single migration_is_running() function.

To accommodate this, and since the same functionality can be achieved
with migration_is_running(), use it instead of migration_is_active().

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Hyman Huang <yong.huang@smartx.com>
Tested-by: Joao Martins <joao.m.martins@oracle.com>
Link: https://lore.kernel.org/r/20241218134022.21264-6-avihaih@nvidia.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
 system/dirtylimit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/system/dirtylimit.c b/system/dirtylimit.c
index d94b994bd81bd44b95f120a53ce83b6809e60297..7c071248bbf92389977dab8b7d4808c9f57af630 100644
--- a/system/dirtylimit.c
+++ b/system/dirtylimit.c
@@ -80,8 +80,7 @@  static void vcpu_dirty_rate_stat_collect(void)
     int i = 0;
     int64_t period = DIRTYLIMIT_CALC_TIME_MS;
 
-    if (migrate_dirty_limit() &&
-        migration_is_active()) {
+    if (migrate_dirty_limit() && migration_is_running()) {
         period = migrate_vcpu_dirty_limit_period();
     }