Received: from eggs.gnu.org ([2001:4830:134:3::10]:60028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVinZ-00075n-Cu for qemu-devel@nongnu.org; Wed, 11 Mar 2015 11:43:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVinY-0003Mi-HP for qemu-devel@nongnu.org; Wed, 11 Mar 2015 11:43:53 -0400 Date: Wed, 11 Mar 2015 15:43:44 +0000 From: Stefan Hajnoczi Message-ID: <20150311154344.GJ10493@stefanha-thinkpad.redhat.com> References: <1425338403-16138-1-git-send-email-jsnow@redhat.com> <1425338403-16138-7-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fKov5AqTsvseSZ0Z" Content-Disposition: inline In-Reply-To: <1425338403-16138-7-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 06/17] hbitmap: add hbitmap_merge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: famz@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, armbru@redhat.com, vsementsov@parallels.com, stefanha@redhat.com --fKov5AqTsvseSZ0Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 02, 2015 at 06:19:52PM -0500, John Snow wrote: > We add a bitmap merge operation to assist in error cases > where we wish to combine two bitmaps together. >=20 > 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) ~=3D 1.01587 * bits >=20 > We may be able to improve running speed for particularly sparse > bitmaps by using iterators, but the running time for dense maps > will be worse. >=20 > We present the simpler solution first, and we can refine it later > if needed. >=20 > Signed-off-by: John Snow > Reviewed-by: Max Reitz > Reviewed-by: Stefan Hajnoczi > --- > include/qemu/hbitmap.h | 11 +++++++++++ > util/hbitmap.c | 32 ++++++++++++++++++++++++++++++++ > 2 files changed, 43 insertions(+) Reviewed-by: Stefan Hajnoczi --fKov5AqTsvseSZ0Z Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVAGKwAAoJEJykq7OBq3PIonsIAKvnNHeLOv+6zyb5qLohPaYD YFjpvUaElTKF+h8Mchd2/10oVFve8yRdXq8irdy0VbJLwKQ3sJVT14GMPmnyxWMJ ruPvQhQbJU+h1KYc44LZSbxtxYV6uhqpdF1QTUVZ8tc5N661pjxzQZfDJK3W4L9X FsTkLPPH6PmDR/7Yx607vBz/cCdLZz5Ex0I7usNiMwUUHfD28fskY+aSaWwU4ZMP acMn6PlVqml/Z0dAhLEOiZdtJHii6l4HgdQtvCIJnWqPkyRTNFyLv5vGpzrgkk6K kZeB3HcRVExWiLlZNEvQpmlAjV6+clVsIJfT0OgiEFwqyypsfkkC0LS0s1VfRAk= =ES4R -----END PGP SIGNATURE----- --fKov5AqTsvseSZ0Z--