qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1] migration: clear the memory region dirty bitmap when skip


From: David Hildenbrand
Subject: Re: [PATCH v1] migration: clear the memory region dirty bitmap when skipping free pages
Date: Wed, 14 Jul 2021 12:30:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]