Re: [Qemu-devel] [virtio-dev] Re: [PATCH v9 3/8] migration: use bitmap_mutex in migration_bitmap_clear_dirty

2018-11-27 Thread Wei Wang
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

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v9 3/8] migration: use bitmap_mutex in migration_bitmap_clear_dirty

2018-11-26 Thread Peter Xu
On Tue, Nov 27, 2018 at 02:12:34PM +0800, Wei Wang wrote: > On 11/27/2018 02:02 PM, Wei Wang wrote: > > On 11/27/2018 01:40 PM, Peter Xu wrote: > > > On Thu, Nov 15, 2018 at 06:07:59PM +0800, Wei Wang wrote: > > > > The bitmap mutex is used to synchronize threads to update the dirty > > > > bitmap

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v9 3/8] migration: use bitmap_mutex in migration_bitmap_clear_dirty

2018-11-26 Thread Wei Wang
On 11/27/2018 02:02 PM, Wei Wang wrote: On 11/27/2018 01:40 PM, Peter Xu wrote: On Thu, Nov 15, 2018 at 06:07:59PM +0800, Wei Wang wrote: The bitmap mutex is used to synchronize threads to update the dirty bitmap and the migration_dirty_pages counter. For example, the free page optimization