Re: [Qemu-devel] [PATCH v11 06/13] hbitmap: add hbitmap_merge

2015-01-16 Thread Max Reitz
On 2015-01-12 at 11:30, 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_LEVELS) ~=

[Qemu-devel] [PATCH v11 06/13] hbitmap: add hbitmap_merge

2015-01-12 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