Re: [Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-23 Thread Wen Congyang
On 11/20/2015 05:59 PM, Fam Zheng wrote: > "s->bitmap" tracks done sectors, we only check bit states without using any > iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and > more memory efficient. > > Meanwhile, rename it to done_bitmap, to reflect the intention. > >

Re: [Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-23 Thread Wen Congyang
On 11/23/2015 05:19 PM, Fam Zheng wrote: > On Mon, 11/23 17:01, Wen Congyang wrote: >> On 11/20/2015 05:59 PM, Fam Zheng wrote: >>> "s->bitmap" tracks done sectors, we only check bit states without using any >>> iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and >>> more

Re: [Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-23 Thread Fam Zheng
On Mon, 11/23 17:24, Wen Congyang wrote: > On 11/23/2015 05:19 PM, Fam Zheng wrote: > > On Mon, 11/23 17:01, Wen Congyang wrote: > >> On 11/20/2015 05:59 PM, Fam Zheng wrote: > >>> "s->bitmap" tracks done sectors, we only check bit states without using > >>> any > >>> iterator which HBitmap is

Re: [Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-23 Thread Fam Zheng
On Mon, 11/23 17:01, Wen Congyang wrote: > On 11/20/2015 05:59 PM, Fam Zheng wrote: > > "s->bitmap" tracks done sectors, we only check bit states without using any > > iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and > > more memory efficient. > > > > Meanwhile, rename

Re: [Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-23 Thread Wen Congyang
On 11/23/2015 05:55 PM, Fam Zheng wrote: > On Mon, 11/23 17:24, Wen Congyang wrote: >> On 11/23/2015 05:19 PM, Fam Zheng wrote: >>> On Mon, 11/23 17:01, Wen Congyang wrote: On 11/20/2015 05:59 PM, Fam Zheng wrote: > "s->bitmap" tracks done sectors, we only check bit states without using

Re: [Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-23 Thread Paolo Bonzini
On 23/11/2015 10:55, Fam Zheng wrote: >>> Why? I think bitmap_set is a better match with bitmap_new below. >> >> set_bit() is quicker than bitmap_set() if you only set one bit. > > How much quicker is it? This doesn't sound convincing enough for me to lose > the > readability. Substantially.

Re: [Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-23 Thread John Snow
On 11/20/2015 04:59 AM, Fam Zheng wrote: > "s->bitmap" tracks done sectors, we only check bit states without using any > iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and > more memory efficient. > > Meanwhile, rename it to done_bitmap, to reflect the intention. > >

Re: [Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-22 Thread Fam Zheng
On Fri, 11/20 18:53, Vladimir Sementsov-Ogievskiy wrote: > On 20.11.2015 12:59, Fam Zheng wrote: > >"s->bitmap" tracks done sectors, we only check bit states without using any > >iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and > >more memory efficient. > > > >Meanwhile,

[Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-20 Thread Fam Zheng
"s->bitmap" tracks done sectors, we only check bit states without using any iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and more memory efficient. Meanwhile, rename it to done_bitmap, to reflect the intention. Signed-off-by: Fam Zheng ---

Re: [Qemu-devel] [PATCH for 2.6 1/3] backup: Use Bitmap to replace "s->bitmap"

2015-11-20 Thread Vladimir Sementsov-Ogievskiy
On 20.11.2015 12:59, Fam Zheng wrote: "s->bitmap" tracks done sectors, we only check bit states without using any iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and more memory efficient. Meanwhile, rename it to done_bitmap, to reflect the intention. Signed-off-by: Fam