From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI0WZ-0007Mi-J5 for qemu-devel@nongnu.org; Tue, 19 Mar 2013 13:40:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UI0WU-0002eB-Ne for qemu-devel@nongnu.org; Tue, 19 Mar 2013 13:40:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI0WU-0002dU-Gs for qemu-devel@nongnu.org; Tue, 19 Mar 2013 13:40:30 -0400 Message-ID: <5148A309.3000100@redhat.com> Date: Tue, 19 Mar 2013 11:40:25 -0600 From: Eric Blake MIME-Version: 1.0 References: <1363362619-3190-1-git-send-email-pl@kamp.de> <1363362619-3190-9-git-send-email-pl@kamp.de> In-Reply-To: <1363362619-3190-9-git-send-email-pl@kamp.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2OCHDCCSCEUTVBHXKFGNP" Subject: Re: [Qemu-devel] [PATCHv2 8/9] migration: do not search dirty pages in bulk stage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2OCHDCCSCEUTVBHXKFGNP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/15/2013 09:50 AM, Peter Lieven wrote: > avoid searching for dirty pages just increment the > page offset. all pages are dirty anyway. >=20 > Signed-off-by: Peter Lieven > --- > arch_init.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) >=20 > diff --git a/arch_init.c b/arch_init.c > index a3dc20d..ca281ad 100644 > --- a/arch_init.c > +++ b/arch_init.c > @@ -321,8 +321,14 @@ ram_addr_t migration_bitmap_find_and_reset_dirty(M= emoryRegion *mr, > unsigned long nr =3D base + (start >> TARGET_PAGE_BITS); > unsigned long size =3D base + (int128_get64(mr->size) >> TARGET_PA= GE_BITS); > =20 > - unsigned long next =3D find_next_bit(migration_bitmap, size, nr); > - > + unsigned long next; > + =20 > + if (ram_bulk_stage) { > + next =3D nr + 1; > + } else { > + next =3D find_next_bit(migration_bitmap, size, nr); > + } This part makes sense. > + =20 > if (next < size) { > clear_bit(next, migration_bitmap); > migration_dirty_pages--; > @@ -523,7 +529,7 @@ static void reset_ram_globals(void) > { > last_seen_block =3D NULL; > last_sent_block =3D NULL; > - last_offset =3D 0; > + last_offset =3D -1; But what is this change doing? I don't see it mentioned in the commit message. Does it belong to a different commit? > last_version =3D ram_list.version; > ram_bulk_stage =3D true; > } >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2OCHDCCSCEUTVBHXKFGNP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRSKMJAAoJEKeha0olJ0NqaCMIAIUu20xy+M/xyhQLsa6B2crB hGUUVQ/KPieF7qVbdbiGCgjq1tSOk23XSmxO5G5aZrS7PMRsf/CSWMUpB6LLxbVW fw4XEztXlAtCGQqHxQUFy0Rz6/p3ppapI7vZp7G61+aA37PTAcAGygCq6dq+EmAB N4xhy7WvdBFyT8WCFta9qCqiaG4PWdi/P1KDxQbZDbIIl2hmqdqDUW0rZNs//v3f ZNTEWM+fc3kHKVYNQh8eW73uHW0Xz/Pwu/ecyuz3SsoYORIKXTFXpIxG4vgQW4hI cCiQ9zu/b42PVhUMZR99yws03Q3xtlQJ2Dg6pqoE7Ic+FABoWdguDUIve8smAEQ= =hSrr -----END PGP SIGNATURE----- ------enig2OCHDCCSCEUTVBHXKFGNP--