From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T10ab-00053v-19 for qemu-devel@nongnu.org; Mon, 13 Aug 2012 15:46:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T10aV-0003Dc-VL for qemu-devel@nongnu.org; Mon, 13 Aug 2012 15:46:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T10aV-0003DW-No for qemu-devel@nongnu.org; Mon, 13 Aug 2012 15:46:07 -0400 Message-ID: <5029597D.5050504@redhat.com> Date: Mon, 13 Aug 2012 13:46:05 -0600 From: Eric Blake MIME-Version: 1.0 References: <2b6cf8e2cf421bb6645a653bd7d79a5d321faee1.1340987905.git.quintela@redhat.com> <20120813163923.2b7bc886@doriath.home> In-Reply-To: <20120813163923.2b7bc886@doriath.home> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig64ADD4EE84483BD448285A12" Subject: Re: [Qemu-devel] [PATCH 06/13] Add spent time for migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, Juan Quintela This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig64ADD4EE84483BD448285A12 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 08/13/2012 01:39 PM, Luiz Capitulino wrote: > On Fri, 29 Jun 2012 18:43:57 +0200 > Juan Quintela wrote: >=20 >> We add time spent for migration to the output of "info migrate" >> command. 'total_time' means time since the start fo migration if >> migration is 'active', and total time of migration if migration is >> completed. As we are also interested in transferred ram when >> migration completes, adding all ram statistics >=20 > I see this has already been merged and am sorry for being late with my > review, but it turns out that there are a few issues to be addressed in= > this patch, comments inlined below. >=20 > Another point is that this patch extends the query-migrate command. We'= ve > decided not to extend QMP commands, however I think that we should rela= x > that restriction for query commands, because the client doesn't need to= know > the new fields in advance. >=20 >> >> Signed-off-by: Juan Quintela >> --- >> hmp.c | 2 ++ >> migration.c | 11 +++++++++++ >> migration.h | 1 + >> qapi-schema.json | 12 +++++++++--- >> 4 files changed, 23 insertions(+), 3 deletions(-) >> >> diff --git a/hmp.c b/hmp.c >> index b9cec1d..4c6d4ae 100644 >> --- a/hmp.c >> +++ b/hmp.c >> @@ -145,6 +145,8 @@ void hmp_info_migrate(Monitor *mon) >> info->ram->remaining >> 10); >> monitor_printf(mon, "total ram: %" PRIu64 " kbytes\n", >> info->ram->total >> 10); >> + monitor_printf(mon, "total time: %" PRIu64 " milliseconds\n",= >> + info->ram->total_time); >=20 > This adds a new line to the HMP output between the end of the ram stats= and > the disk stats. Iirc libvirt parses this output when in non-json mode, = although > I don't think it ever does it for disk migration. >=20 > Eric, does libvirt do that? Non-issue. Libvirt insists on using QMP (JSON mode) if qemu >=3D 0.15, precisely so that changes to HMP do not affect libvirt parsing. >> +++ b/migration.c >> @@ -131,6 +131,8 @@ MigrationInfo *qmp_query_migrate(Error **errp) >> info->ram->transferred =3D ram_bytes_transferred(); >> info->ram->remaining =3D ram_bytes_remaining(); >> info->ram->total =3D ram_bytes_total(); >> + info->ram->total_time =3D qemu_get_clock_ms(rt_clock) >> + - s->total_time; >> >=20 > I really don't think that 'total_time' pertains to the ram stats info, = I think > it should be in the MigrationInfo dict. Yes, Juan took care of that in https://lists.gnu.org/archive/html/qemu-devel/2012-08/msg02142.html --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig64ADD4EE84483BD448285A12 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/ iQEcBAEBCAAGBQJQKVl+AAoJEKeha0olJ0NqA+0H/0hZ3Ey0qAZW0oi1colB7eKg sDx/sq8Z0cg51joODHhxQ6gdx0/ts6uqQIonouTGMyCmKheEwDkEUYjuyhdennaV W340Zmr0HUQT0I1igJY/xFJUICAtzXYO18eEN+fLxH9B5raxrTpVi0hWYsJOcWpU EBCX7UaWV3d2/u4Dw+/VW0MhFOdyE8/P7Y5AXTUngUwhtgGMO6mjscYbjw0pdKZ1 FiX9jDw5L1DsYmW7p0HgzSVTS/LSkuyMEfrR9Qe3skcSwfMa8uODQilkL5PJV/Kv kgxgN5P6c4euxQcgUKApUo01iVyVosC88uWoQOm3mTFqbDZPx2JdQrnRMkO/XZM= =JqRe -----END PGP SIGNATURE----- --------------enig64ADD4EE84483BD448285A12--