On 14.07.21 12:27, Michael S. Tsirkin wrote:
On Wed, Jul 14, 2021 at 03:51:04AM -0400, Wei Wang wrote:
When skipping free pages, their corresponding dirty bits in the memory
region dirty bitmap need to be cleared. Otherwise the skipped pages will
be sent in the next round after the migration thread syncs dirty bits
from the memory region dirty bitmap.
migration_clear_memory_region_dirty_bitmap_range is put outside the
bitmap_mutex, becasue
because?
memory_region_clear_dirty_bitmap is possible to block
on the kvm slot mutex (don't want holding bitmap_mutex while blocked on
another mutex), and clear_bmap_test_and_clear uses atomic operation.
How is that different from our existing caller?
Please either clean everything up, completely avoiding the lock
(separate patch), or move it under the lock.
Or am I missing something important?
--
Thanks,
David / dhildenb