From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0xq2-0005OQ-2P for qemu-devel@nongnu.org; Mon, 13 Aug 2012 12:50:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0xpz-0006DV-8y for qemu-devel@nongnu.org; Mon, 13 Aug 2012 12:49:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34725) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0xpz-0006DQ-0c for qemu-devel@nongnu.org; Mon, 13 Aug 2012 12:49:55 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7DGnr0b006633 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Aug 2012 12:49:54 -0400 Message-ID: <5029302F.2080503@redhat.com> Date: Mon, 13 Aug 2012 10:49:51 -0600 From: Eric Blake MIME-Version: 1.0 References: <1344855057-32509-1-git-send-email-quintela@redhat.com> <1344855057-32509-8-git-send-email-quintela@redhat.com> <50291941.7020002@redhat.com> <87y5liwzg8.fsf@elfo.mitica> In-Reply-To: <87y5liwzg8.fsf@elfo.mitica> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigD772A0AE498BE2064B213882" Subject: Re: [Qemu-devel] [PATCH 7/7] migration: Add dirty_pages_rate to query migrate output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD772A0AE498BE2064B213882 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/13/2012 10:04 AM, Juan Quintela wrote: >>> +# @dirty-pages-rate: number of pages dirtied by second by the >>> +# guest. (since 1.2) >> >> Since HMP only prints this stat when it is non-zero, should this field= >> be marked optional? Then again, once you have dirty page tracking, I >> suspect this would never be zero (or even showing an explicit zero wou= ld >> help detect stalls). >=20 > What is easier for libvirt to have here. >=20 > At the beggining, this value is going to be wrong/cero. I can: > - not print it until it is !=3D 0 > - print a big enough number ) > - make it optional? I guess this would alse be more difficult for > libvirt. > - put your good idea here? I see your point about querying early enough that there is not yet enough data to have a good estimate. In that case, either outputting 0 or omitting the field will do the trick. Libvirt already has to support older qemu that always omitted the field, and it is a one-liner code addition in libvirt to say that if the field is omitted, treat it like '0'. I'm not even quite sure what libvirt will be able to do with this number; libvirt made some unfortunate API decisions where migration statistics are exposed to the user in a hard-coded struct (virDomainJobInfo), and since we didn't allow for the struct to grow without breaking ABI, exposing additional information would require a new libvirt API. So don't let libvirt hold up the inclusion of this useful information on the qemu side of things. Maybe another option would be to return [U]INT_MAX when there is not enough data to yet provide a valid number, where having a non-zero value at least lets people know that the stat will be available in a later call= =2E --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigD772A0AE498BE2064B213882 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.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQKTAwAAoJEKeha0olJ0NqYU8H/1W8Nj986cU6ZtuRTNkPWqhC B1OO/w3yybdfBDpGtbB7q/kD3Jw0McsQolCwhKI0MyVgBJlXDtXK+pbraH/TYi8a tAWIRdmyaRfWTzf5WXAh8lZR6yyhl9wQTdD5FMS8hACdsSRAUKr7Yyrp9fme4I5N X2qxNh8Hx/rL2L393nCybsswj5IGpeT15V77YnEOhZ0XiE3uDZ80GunNDBJzDa+F ZcUbzFYwY4BYDfdY2N2DIEEWl6753bwKu/Ty9hlMVJT6jsLUkZWXLfs7kF8FFeoJ i+csXfJJPfOsEGQSISB8pKCVxcXuB7kwjTPpJMrOdMLMvrDYFXuOhbkFKV1L3Lw= =tlO7 -----END PGP SIGNATURE----- --------------enigD772A0AE498BE2064B213882--