pet...@redhat.com writes: > From: Peter Xu <pet...@redhat.com> > > When the migration frameworks fetches the exact pending sizes, it means > this check: > > remaining_size < s->threshold_size > > Must have been done already, actually at migration_iteration_run(): > > if (must_precopy <= s->threshold_size) { > qemu_savevm_state_pending_exact(&must_precopy, &can_postcopy); > > That should be after one round of ram_state_pending_estimate(). It makes > the 2nd check meaningless and can be dropped. > > To say it in another way, when reaching ->state_pending_exact(), we > unconditionally sync dirty bits for precopy. > > Then we can drop migrate_get_current() there too. > > Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Fabiano Rosas <faro...@suse.de>