On Wed, Apr 04, 2018 at 11:04:59AM +0200, Juan Quintela wrote: > Balamuruhan S <bal...@linux.vnet.ibm.com> wrote: > > expected_downtime value is not accurate with dirty_pages_rate * page_size, > > using ram_bytes_remaining would yeild it correct. > > > > Signed-off-by: Balamuruhan S <bal...@linux.vnet.ibm.com> > > Reviewed-by: Juan Quintela <quint...@redhat.com> > > See my other mail on the thread, my understanding is that your change is > corret (TM).
Juan, Please help to merge it. Regards, Bala > > Thanks, Juan. > > > --- > > migration/migration.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/migration/migration.c b/migration/migration.c > > index 58bd382730..4e43dc4f92 100644 > > --- a/migration/migration.c > > +++ b/migration/migration.c > > @@ -2245,8 +2245,7 @@ static void migration_update_counters(MigrationState > > *s, > > * recalculate. 10000 is a small enough number for our purposes > > */ > > if (ram_counters.dirty_pages_rate && transferred > 10000) { > > - s->expected_downtime = ram_counters.dirty_pages_rate * > > - qemu_target_page_size() / bandwidth; > > + s->expected_downtime = ram_bytes_remaining() / bandwidth; > > } > > > > qemu_file_reset_rate_limit(s->to_dst_file); >