* [Qemu-devel] [PATCH v1] migration: use s->threshold_size inside migration_update_counters
@ 2018-01-16 10:51 Wei Wang
2018-01-16 12:19 ` Peter Xu
0 siblings, 1 reply; 4+ messages in thread
From: Wei Wang @ 2018-01-16 10:51 UTC (permalink / raw)
To: qemu-devel; +Cc: quintela, dgilbert, peterx, Wei Wang
The threshold size is changed to be recorded in s->threshold_size by
commit b15df1ae5063c7c181f8f068f9eba7661b3b5e1.
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
---
migration/migration.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
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] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v1] migration: use s->threshold_size inside migration_update_counters
2018-01-16 10:51 [Qemu-devel] [PATCH v1] migration: use s->threshold_size inside migration_update_counters Wei Wang
@ 2018-01-16 12:19 ` Peter Xu
2018-01-17 1:06 ` Wei Wang
0 siblings, 1 reply; 4+ messages in thread
From: Peter Xu @ 2018-01-16 12:19 UTC (permalink / raw)
To: Wei Wang; +Cc: qemu-devel, quintela, dgilbert
On Tue, Jan 16, 2018 at 06:51:32PM +0800, Wei Wang wrote:
> The threshold size is changed to be recorded in s->threshold_size by
> commit b15df1ae5063c7c181f8f068f9eba7661b3b5e1.
>
> Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Could you help confirm the commit ID? Since what I see is
b15df1ae50. Otherwise:
Reviewed-by: Peter Xu <peterx@redhat.com>
And I'd prefer add:
Fixes: b15df1ae50 ("migration: cleanup stats update into function")
Thanks for the patch!
--
Peter Xu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v1] migration: use s->threshold_size inside migration_update_counters
2018-01-16 12:19 ` Peter Xu
@ 2018-01-17 1:06 ` Wei Wang
2018-01-17 4:05 ` Peter Xu
0 siblings, 1 reply; 4+ messages in thread
From: Wei Wang @ 2018-01-17 1:06 UTC (permalink / raw)
To: Peter Xu; +Cc: qemu-devel, quintela, dgilbert
On 01/16/2018 08:19 PM, Peter Xu wrote:
> On Tue, Jan 16, 2018 at 06:51:32PM +0800, Wei Wang wrote:
>> The threshold size is changed to be recorded in s->threshold_size by
>> commit b15df1ae5063c7c181f8f068f9eba7661b3b5e1.
>>
>> Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> Could you help confirm the commit ID? Since what I see is
> b15df1ae50. Otherwise:
>
> Reviewed-by: Peter Xu <peterx@redhat.com>
>
> And I'd prefer add:
>
> Fixes: b15df1ae50 ("migration: cleanup stats update into function")
>
> Thanks for the patch!
>
Sure. b15df1ae50 is shortcut and works too. Agree with your change.
Best,
Wei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v1] migration: use s->threshold_size inside migration_update_counters
2018-01-17 1:06 ` Wei Wang
@ 2018-01-17 4:05 ` Peter Xu
0 siblings, 0 replies; 4+ messages in thread
From: Peter Xu @ 2018-01-17 4:05 UTC (permalink / raw)
To: Wei Wang; +Cc: qemu-devel, quintela, dgilbert
On Wed, Jan 17, 2018 at 09:06:43AM +0800, Wei Wang wrote:
> On 01/16/2018 08:19 PM, Peter Xu wrote:
> > On Tue, Jan 16, 2018 at 06:51:32PM +0800, Wei Wang wrote:
> > > The threshold size is changed to be recorded in s->threshold_size by
> > > commit b15df1ae5063c7c181f8f068f9eba7661b3b5e1.
> > >
> > > Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> > Could you help confirm the commit ID? Since what I see is
> > b15df1ae50. Otherwise:
> >
> > Reviewed-by: Peter Xu <peterx@redhat.com>
> >
> > And I'd prefer add:
> >
> > Fixes: b15df1ae50 ("migration: cleanup stats update into function")
> >
> > Thanks for the patch!
> >
>
> Sure. b15df1ae50 is shortcut and works too. Agree with your change.
Ouch. I wasn't taking about shortcut or not... I must have pasted a
wrong commit ID of yours. Please forget that. :)
--
Peter Xu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-17 4:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-16 10:51 [Qemu-devel] [PATCH v1] migration: use s->threshold_size inside migration_update_counters Wei Wang
2018-01-16 12:19 ` Peter Xu
2018-01-17 1:06 ` Wei Wang
2018-01-17 4:05 ` Peter Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).