From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWt8s-0003n3-69 for qemu-devel@nongnu.org; Tue, 01 Sep 2015 17:30:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZWt8n-00020p-99 for qemu-devel@nongnu.org; Tue, 01 Sep 2015 17:30:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZWt8n-00020j-1w for qemu-devel@nongnu.org; Tue, 01 Sep 2015 17:30:53 -0400 References: <1441118763-17510-1-git-send-email-jjherne@linux.vnet.ibm.com> <1441118763-17510-4-git-send-email-jjherne@linux.vnet.ibm.com> From: Eric Blake Message-ID: <55E6190B.8050501@redhat.com> Date: Tue, 1 Sep 2015 15:30:51 -0600 MIME-Version: 1.0 In-Reply-To: <1441118763-17510-4-git-send-email-jjherne@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gK93hWH4XVc4Otp18N1qGsK7UP0IVKQWp" Subject: Re: [Qemu-devel] [PATCH v5 3/5] migration: Dynamic cpu throttling for auto-converge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Jason J. Herne" , afaerber@suse.de, amit.shah@redhat.com, dgilbert@redhat.com, borntraeger@de.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gK93hWH4XVc4Otp18N1qGsK7UP0IVKQWp Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/01/2015 08:46 AM, Jason J. Herne wrote: > Remove traditional auto-converge static 30ms throttling code and replac= e it > with a dynamic throttling algorithm. >=20 > Additionally, be more aggressive when deciding when to start throttling= =2E > Previously we waited until four unproductive memory passes. Now we begi= n > throttling after only two unproductive memory passes. Four seemed quite= > arbitrary and only waiting for two passes allows us to complete the mig= ration > faster. >=20 > Signed-off-by: Jason J. Herne > Reviewed-by: Matthew Rosato > --- > arch_init.c | 88 ++++++++++++++++++-------------------------= -------- > migration/migration.c | 4 +++ > 2 files changed, 34 insertions(+), 58 deletions(-) > +static void mig_throttle_guest_down(void) > +{ > + MigrationState *s =3D migrate_get_current(); > + uint64_t pct_initial =3D > + s->parameters[MIGRATION_PARAMETER_X_CPU_THROTTLE_INITIAL];= > + uint64_t pct_icrement =3D > + s->parameters[MIGRATION_PARAMETER_X_CPU_THROTTLE_INCREMENT= ]; > + > + /* We have not started throttling yet. Let's start it. */ > + if (!cpu_throttle_active()) { > + cpu_throttle_set(pct_initial); > + } else { > + /* Throttling already on, just increase the rate */ > + cpu_throttle_set(cpu_throttle_get_percentage() + pct_icrement)= ; What happens if the addition results in a percentage larger than 99? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --gK93hWH4XVc4Otp18N1qGsK7UP0IVKQWp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV5hkLAAoJEKeha0olJ0NqdRAIAJfzH3w5RGP2mcuZqT89g2no rzs0Kkyq8UWjmg9NnRHYLdeTlRlHgokmiWpJVaNRUJ6nDmV4eFZVtNgJAbM9Lk1P dE6R9E/RnRJQfySHbcKlOJiqVOY2mjO4cbmFIztyCI8LIrOGcQ0xbUPgXVO2//i3 Tg+4yW17mBgC1jqe1KO7lwKsigrDtk7WTwXmR/0+Uhshw9+Kqqbsi4kPfSQ57W5G smax0vD/wP49GmVSXhYt0mlI6FxyCAM05jaTPuTHT1gMu/7MYaFhgmAp4gjCogjV GjgJKEKWEGEq4WGd0QurE8fyw2bScpCm3BZhf8YtpAlJM4KjwAJUv5PjHo6qEsQ= =u7eH -----END PGP SIGNATURE----- --gK93hWH4XVc4Otp18N1qGsK7UP0IVKQWp--