Re: [Qemu-devel] [PATCH v5 07/21] hbitmap: add hbitmap_merge

2015-04-17 Thread John Snow
On 04/17/2015 11:23 AM, Eric Blake wrote: On 04/08/2015 04:19 PM, John Snow wrote: We add a bitmap merge operation to assist in error cases where we wish to combine two bitmaps together. This is algorithmically O(bits) provided HBITMAP_LEVELS remains constant. For a full bitmap on a 64bit mac

Re: [Qemu-devel] [PATCH v5 07/21] hbitmap: add hbitmap_merge

2015-04-17 Thread Eric Blake
On 04/08/2015 04:19 PM, John Snow wrote: > We add a bitmap merge operation to assist in error cases > where we wish to combine two bitmaps together. > > This is algorithmically O(bits) provided HBITMAP_LEVELS remains > constant. For a full bitmap on a 64bit machine: > sum(bits/64^k, k, 0, HBITMAP_

[Qemu-devel] [PATCH v5 07/21] hbitmap: add hbitmap_merge

2015-04-08 Thread John Snow
We add a bitmap merge operation to assist in error cases where we wish to combine two bitmaps together. This is algorithmically O(bits) provided HBITMAP_LEVELS remains constant. For a full bitmap on a 64bit machine: sum(bits/64^k, k, 0, HBITMAP_LEVELS) ~= 1.01587 * bits We may be able to improve