Received: from eggs.gnu.org ([2001:4830:134:3::10]:44491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yde6B-0000if-3X for qemu-devel@nongnu.org; Thu, 02 Apr 2015 08:19:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yde6A-0007xU-6R for qemu-devel@nongnu.org; Thu, 02 Apr 2015 08:19:51 -0400 Date: Thu, 2 Apr 2015 13:19:41 +0100 From: Stefan Hajnoczi Message-ID: <20150402121941.GB25244@stefanha-thinkpad.redhat.com> References: <1426879023-18151-1-git-send-email-jsnow@redhat.com> <1426879023-18151-8-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZfOjI3PrQbgiZnxM" Content-Disposition: inline In-Reply-To: <1426879023-18151-8-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v4 07/20] 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, mreitz@redhat.com --ZfOjI3PrQbgiZnxM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=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 > --- > include/qemu/hbitmap.h | 11 +++++++++++ > util/hbitmap.c | 29 +++++++++++++++++++++++++++++ > 2 files changed, 40 insertions(+) Reviewed-by: Stefan Hajnoczi --ZfOjI3PrQbgiZnxM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVHTPdAAoJEJykq7OBq3PITmMH+wX8GJmVM5ZqA/Sk3qVOwh+2 abweMyccn52FigMp9WSe20HLQK9NddoqKKw7XZPCYTQqcw5En8vHkeyIuV304ZHU S+8uvZHN8jP6jxJWLS5i8N9PaAZz9vXiP4VMpsWPGRByF63nfTPZ4LVSt+nWjAPe zK24pJohmXsRokXeJT7eqfEGmIMvfgvYFiL+L4vvH8Ek/T7wNkWxgaM4AT5aDn/U aafZatSyLLBiNIRr+qacxK/ANacr7wtOmAipyixroCZNhQRyqoQDMk0/IsibweaC y3kyGw94YIU2Za8/llkFeXpGrj18dKm+KxpfnxjZI2MpmI8iu7E8Xrh1IsLX9Pc= =qU/u -----END PGP SIGNATURE----- --ZfOjI3PrQbgiZnxM--