Message ID | 20241216094638.26406-8-avihaih@nvidia.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | migration: Drop/unexport migration_is_device() and migration_is_active() | expand |
On Mon, Dec 16, 2024 at 5:47 PM Avihai Horon <avihaih@nvidia.com> wrote: > 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. > Could you post the related links? > > 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> > --- > system/dirtylimit.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/system/dirtylimit.c b/system/dirtylimit.c > index ab20da34bb..d7a855c603 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(); > } > > -- > 2.40.1 > >
On 17/12/2024 5:01, Yong Huang wrote: > *External email: Use caution opening links or attachments* > > > > > On Mon, Dec 16, 2024 at 5:47 PM Avihai Horon <avihaih@nvidia.com> wrote: > > 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. > > > Could you post the related links? Sure, it's here: https://lore.kernel.org/qemu-devel/20241024213056.1395400-1-peterx@redhat.com/ Peter took only patches 1-5 of this series. Thanks. > > 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> > --- > system/dirtylimit.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/system/dirtylimit.c b/system/dirtylimit.c > index ab20da34bb..d7a855c603 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(); > } > > -- > 2.40.1 > > > > -- > Best regards
On Tue, Dec 17, 2024 at 5:47 PM Avihai Horon <avihaih@nvidia.com> wrote: > > On 17/12/2024 5:01, Yong Huang wrote: > > *External email: Use caution opening links or attachments* > > > > > > > > > > On Mon, Dec 16, 2024 at 5:47 PM Avihai Horon <avihaih@nvidia.com> wrote: > > > > 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. > > > > > > Could you post the related links? > > Sure, it's here: > > https://lore.kernel.org/qemu-devel/20241024213056.1395400-1-peterx@redhat.com/ > > Peter took only patches 1-5 of this series. > > Thanks. > > > > > 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> > > --- > > system/dirtylimit.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/system/dirtylimit.c b/system/dirtylimit.c > > index ab20da34bb..d7a855c603 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(); > > } > > > > -- > > 2.40.1 > > > > > > > > -- > > Best regards > Thanks, Reviewed-by: Hyman Huang <yong.huang@smartx.com>
diff --git a/system/dirtylimit.c b/system/dirtylimit.c index ab20da34bb..d7a855c603 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(); }
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> --- system/dirtylimit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)