* [Qemu-devel] [PATCH v2] migration: use s->threshold_size inside migration_update_counters
@ 2018-01-22 11:36 Wei Wang
2018-01-28 19:15 ` Juan Quintela
0 siblings, 1 reply; 2+ messages in thread
From: Wei Wang @ 2018-01-22 11:36 UTC (permalink / raw)
To: qemu-devel, peterx, quintela, dgilbert; +Cc: Wei Wang
Fixes: b15df1ae50 ("migration: cleanup stats update into function")
The threshold size is changed to be recorded in s->threshold_size.
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
migration/migration.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
v1->v2 change:
only commit log description change
diff --git a/migration/migration.c b/migration/migration.c
index d3a1c49..bfd1a16 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2212,7 +2212,6 @@ static void migration_update_counters(MigrationState *s,
int64_t current_time)
{
uint64_t transferred, time_spent;
- int64_t threshold_size;
double bandwidth;
if (current_time < s->iteration_start_time + BUFFER_DELAY) {
@@ -2222,7 +2221,7 @@ static void migration_update_counters(MigrationState *s,
transferred = qemu_ftell(s->to_dst_file) - s->iteration_initial_bytes;
time_spent = current_time - s->iteration_start_time;
bandwidth = (double)transferred / time_spent;
- threshold_size = bandwidth * s->parameters.downtime_limit;
+ s->threshold_size = bandwidth * s->parameters.downtime_limit;
s->mbps = (((double) transferred * 8.0) /
((double) time_spent / 1000.0)) / 1000.0 / 1000.0;
@@ -2242,7 +2241,7 @@ static void migration_update_counters(MigrationState *s,
s->iteration_initial_bytes = qemu_ftell(s->to_dst_file);
trace_migrate_transferred(transferred, time_spent,
- bandwidth, threshold_size);
+ bandwidth, s->threshold_size);
}
/* Migration thread iteration status */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH v2] migration: use s->threshold_size inside migration_update_counters
2018-01-22 11:36 [Qemu-devel] [PATCH v2] migration: use s->threshold_size inside migration_update_counters Wei Wang
@ 2018-01-28 19:15 ` Juan Quintela
0 siblings, 0 replies; 2+ messages in thread
From: Juan Quintela @ 2018-01-28 19:15 UTC (permalink / raw)
To: Wei Wang; +Cc: qemu-devel, peterx, dgilbert
Wei Wang <wei.w.wang@intel.com> wrote:
> Fixes: b15df1ae50 ("migration: cleanup stats update into function")
> The threshold size is changed to be recorded in s->threshold_size.
>
> Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-28 19:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 11:36 [Qemu-devel] [PATCH v2] migration: use s->threshold_size inside migration_update_counters Wei Wang
2018-01-28 19:15 ` Juan Quintela
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.