Re: [Qemu-block] [PATCH v4 07/20] hbitmap: add hbitmap_merge

2015-04-02 Thread Stefan Hajnoczi
On Fri, Mar 20, 2015 at 03:16:50PM -0400, 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

[Qemu-block] [PATCH v4 07/20] hbitmap: add hbitmap_merge

2015-03-20 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