Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2017-12-28 Thread Fam Zheng
On Thu, 12/28 14:16, Vladimir Sementsov-Ogievskiy wrote: > 28.12.2017 08:24, Fam Zheng wrote: > > On Wed, 12/20 18:49, Vladimir Sementsov-Ogievskiy wrote: > > > Signed-off-by: Vladimir Sementsov-Ogievskiy > > > --- > > > include/block/dirty-bitmap.h | 3 +++ > > > block/dirty-bitmap.c

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-01-18 Thread Paolo Bonzini
On 29/12/2017 02:31, Fam Zheng wrote: >> we have the following comment: >> >>     /* Writing to the list requires the BQL _and_ the dirty_bitmap_mutex. >> * Reading from the list can be done with either the BQL or the >> * dirty_bitmap_mutex.  Modifying a bitmap only requires >> * di

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-01-18 Thread Vladimir Sementsov-Ogievskiy
18.01.2018 11:43, Paolo Bonzini wrote: On 29/12/2017 02:31, Fam Zheng wrote: we have the following comment:     /* Writing to the list requires the BQL _and_ the dirty_bitmap_mutex. * Reading from the list can be done with either the BQL or the * dirty_bitmap_mutex.  Modifying a bi

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-01-18 Thread Paolo Bonzini
On 18/01/2018 10:55, Vladimir Sementsov-Ogievskiy wrote: >> >> Most functions that looks at the list are "called with BQL taken". >> Functions that write to the list are "called with BQL taken" and call >> bdrv_dirty_bitmaps_lock/bdrv_dirty_bitmaps_unlock themselves. > > Paolo, could you please ex

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-01-19 Thread Vladimir Sementsov-Ogievskiy
18.01.2018 13:09, Paolo Bonzini wrote: On 18/01/2018 10:55, Vladimir Sementsov-Ogievskiy wrote: Most functions that looks at the list are "called with BQL taken". Functions that write to the list are "called with BQL taken" and call bdrv_dirty_bitmaps_lock/bdrv_dirty_bitmaps_unlock themselves.

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-01-22 Thread Vladimir Sementsov-Ogievskiy
19.01.2018 17:12, Vladimir Sementsov-Ogievskiy wrote: 18.01.2018 13:09, Paolo Bonzini wrote: On 18/01/2018 10:55, Vladimir Sementsov-Ogievskiy wrote: Most functions that looks at the list are "called with BQL taken". Functions that write to the list are "called with BQL taken" and call bdrv_dir

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-01-22 Thread John Snow
On 01/22/2018 07:14 AM, Vladimir Sementsov-Ogievskiy wrote: > 19.01.2018 17:12, Vladimir Sementsov-Ogievskiy wrote: >> 18.01.2018 13:09, Paolo Bonzini wrote: >>> On 18/01/2018 10:55, Vladimir Sementsov-Ogievskiy wrote: > Most functions that looks at the list are "called with BQL taken". >

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-01-24 Thread Paolo Bonzini
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 >> mutex too. >> Or accessing the bitmap is accessing an

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-01-24 Thread John Snow
On 01/24/2018 05:16 AM, 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 >>>

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-02-06 Thread Vladimir Sementsov-Ogievskiy
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 mutex too. Or accessing t

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-02-12 Thread Vladimir Sementsov-Ogievskiy
18.01.2018 13:09, Paolo Bonzini wrote: On 18/01/2018 10:55, Vladimir Sementsov-Ogievskiy wrote: Most functions that looks at the list are "called with BQL taken". Functions that write to the list are "called with BQL taken" and call bdrv_dirty_bitmaps_lock/bdrv_dirty_bitmaps_unlock themselves.

Re: [Qemu-block] [Qemu-devel] [PATCH v9 03/13] block/dirty-bitmap: add _locked version of bdrv_reclaim_dirty_bitmap

2018-02-12 Thread Paolo Bonzini
On 12/02/2018 18:30, Vladimir Sementsov-Ogievskiy wrote: > 18.01.2018 13:09, Paolo Bonzini wrote:>> We have three cases: >> >> 1) monitor creates and destroy bitmaps. >> >> 2) monitor also has to read the list.  We know it operates with BQL. >> >> 3) users such as mirror.c create a dirty bitmap in