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

2015-04-17 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

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

2015-04-22 Thread Max Reitz
On 18.04.2015 01:49, 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) ~= 1.

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

2015-04-22 Thread Eric Blake
On 04/17/2015 05:49 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_

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

2015-04-23 Thread Stefan Hajnoczi
On Fri, Apr 17, 2015 at 07:49:55PM -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