[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked versio
Re: [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap
Tue, 6 Feb 2018 17:53:03 +0300
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0
24.01.2018 13:16, Paolo Bonzini wrote:
On 22/01/2018 13:14, Vladimir Sementsov-Ogievskiy wrote:
so, accessing the bitmap needs mutex lock?
Then what do you mean under accessing the bitmap? Any touch of
BdrvDirtyBitmap fields? Then "reading the list" will require bitmap
Or accessing the bitmap is accessing any field except
BdrvDirtyBitmap.list? Then in (2), what do you mean? For example
query-block will go through
the list, but it touches other fields too, so it should lock mutex.
The bitmap mutex is internal to block/dirty-bitmap.c.
yes and query-block actually calls bdrv_query_dirty_bitmaps, which locks
and one more question:
What about qmp transactions? Should we lock mutex during the whole
Transactions hold the BQL, but you don't need to lock the bitmap mutex.
I don't understand. But "Accessing a bitmap only requires
dirty_bitmap_mutex".. So, if we have several operations on one bitmap,
each of them will lock/unlock mutex by itself? Then we'll have unlocked
"holes" in our transaction. Or this doesn't matter?
- Re: [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap,
Vladimir Sementsov-Ogievskiy <=