On 11/27/2018 03:41 PM, Peter Xu wrote:

Ok then I'm fine with it.  Though you could update the comments too if
you like:

     /* protects modification of the bitmap and migration_dirty_pages */
     QemuMutex bitmap_mutex;

And it's tricky that sometimes we don't take the lock when reading
this variable "migration_dirty_pages".  I don't see obvious issue so
far, hope it's true (at least I skipped the colo ones...).

The caller reads the value just to estimate the remaining_size, and
it seems fine without a lock, because whether it reads a
value before the update or after the update seem not causing
an issue.

Best,
Wei

Reply via email to