Re: [Qemu-devel] [PATCH v13 05/17] hbitmap: add hbitmap_merge

2015-02-20 Thread Stefan Hajnoczi
On Fri, Feb 13, 2015 at 05:08:46PM -0500, 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-devel] [PATCH v13 05/17] hbitmap: add hbitmap_merge

2015-02-13 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