From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp1bb-0000c7-Dw for qemu-devel@nongnu.org; Wed, 11 Jul 2012 14:25:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sp1bZ-0004u8-1F for qemu-devel@nongnu.org; Wed, 11 Jul 2012 14:25:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sp1bY-0004ty-OH for qemu-devel@nongnu.org; Wed, 11 Jul 2012 14:25:40 -0400 Message-ID: <4FFDC522.9070500@redhat.com> Date: Wed, 11 Jul 2012 12:25:38 -0600 From: Eric Blake MIME-Version: 1.0 References: <2b6cf8e2cf421bb6645a653bd7d79a5d321faee1.1340987905.git.quintela@redhat.com> <20120711150817.09c87ff4@doriath.home> In-Reply-To: <20120711150817.09c87ff4@doriath.home> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigE3C219B2A7E5BAD6D3FADD4C" 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) --------------enigE3C219B2A7E5BAD6D3FADD4C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 07/11/2012 12:08 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. I see a difference between extending output (such as query command return values), where clients can gracefully deal with the absence of a parameter from an older qemu, and extending input (where it is hard to tell up-front whether a parameter will be rejected by an older qemu). This is a case of extending output, so I am okay with it; in fact, I'd rather extend output of existing commands than add a new command, because then libvirt has to probe which command to call, instead of calling one command and then parsing everything available. >> + 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? Libvirt forces the use of QMP for qemu 0.15 and newer. So while there may be other users that care, libvirt could care less whether HMP output changes between qemu 1.1 and 1.2. >> +++ 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. If so, now's the time to change it before it becomes locked in stone with the qemu 1.2 release. Libvirt has not yet been taught to use the new information. >> # >> # @total: total amount of bytes involved in the migration process >> # >> +# @total_time: tota0l amount of ms since migration started. If >=20 > s/total0l/total >=20 > s/ms/miliseconds Actually, milliseconds >=20 >> +# migration has ended, it returns the total migration >> +# time. (since 1.2) >> +# >> # Since: 0.14.0. >> ## >> { 'type': 'MigrationStats', >> - 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' }= } >> + 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,= >> + 'total_time': 'int' } } Also, s/total_time/total-time/ - QMP favors '-' over '_' >> >> ## >> # @MigrationInfo >> @@ -275,8 +280,9 @@ >> # 'cancelled'. If this field is not returned, no migration p= rocess Did we ever decide whether to favor US (canceled) or UK (cancelled)? >> # has been initiated >> # >> -# @ram: #optional @MigrationStats containing detailed migration statu= s, >> -# only returned if status is 'active' >> +# @ram: #optional @MigrationStats containing detailed migration >> +# status, only returned if status is 'active' or >> +# 'completed'. 'comppleted' (since 1.2) s/comppleted/completed/ >> # >> # @disk: #optional @MigrationStats containing detailed disk migration= >> # status, only returned if status is 'active' and it is a bloc= k >=20 >=20 >=20 --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigE3C219B2A7E5BAD6D3FADD4C 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/ iQEcBAEBCAAGBQJP/cUiAAoJEKeha0olJ0NqYvMH/0jsDawA1mgOVuw47gil9ezC PPyRDGQvGq+Xj5/SrrZC1lGXw7p+nhL8rSLLkMtevu/bQ4aiI+39nMYIRI0YDq45 k3ONNSK1Te8ir+Fvht/bCRgVCODyK04ZFRP0MX9xNZqvgkr7KeOnqNDMC2fV/N7Q Qogms/6qtD3Qbx5TqrdAh+QQJhYw8QCPwZVAdxEtmpAvqIOK3GOrYt2um7w4VJiJ xEB+NoNSjoCpXeQJEm4/K+m0DvPyvVygN9PgxKPK/XENNuGn5MXOjfzGR4ghQXiL uYqXASEEzcO5U6tCgQrzp17jjfF8txymgkzI4di7V26kpRNPVBdHtrzCcaAvXkI= =qH8v -----END PGP SIGNATURE----- --------------enigE3C219B2A7E5BAD6D3FADD4C--