From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlkzS-0007Qd-IO for qemu-devel@nongnu.org; Thu, 20 Dec 2012 13:37:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlkzP-0006dB-K5 for qemu-devel@nongnu.org; Thu, 20 Dec 2012 13:37:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlkzP-0006ci-Ck for qemu-devel@nongnu.org; Thu, 20 Dec 2012 13:37:03 -0500 Message-ID: <50D35AC1.8060501@redhat.com> Date: Thu, 20 Dec 2012 11:36:49 -0700 From: Eric Blake MIME-Version: 1.0 References: <1355500182-12743-1-git-send-email-lcapitulino@redhat.com> <1355500182-12743-2-git-send-email-lcapitulino@redhat.com> <24E144B8C0207547AD09C467A8259F75578B48B1@lisa.maurer-it.com> <50D0E158.9070004@redhat.com> <20121219092741.564abff5@doriath.home> In-Reply-To: <20121219092741.564abff5@doriath.home> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig34AAF1556DF9A2E2A726B3AF" Subject: Re: [Qemu-devel] [PATCH 1/3] balloon: drop old stats code & API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: "mdroth@linux.vnet.ibm.com" , "aliguori@us.ibm.com" , "agl@us.ibm.com" , Dietmar Maurer , "qemu-devel@nongnu.org" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig34AAF1556DF9A2E2A726B3AF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/19/2012 04:27 AM, Luiz Capitulino wrote: >> Libvirt has been using it when available (although reluctantly, as it >> risks hanging on an uncooperative guest); >=20 > This has always been disabled and qemu never returns the stats info. > I believe libvirt's code is rotting just like qemu's is. I agree that the QMP has never been providing it (since we pulled it out of QMP precisely because of the potential for a hang), but if you go back far enough to an old qemu that provided the stats via HMP, then libvirt is indeed exposing those stats to the user. There are two places in libvirt code that were collecting stats. One for determining what to print for simple commands like 'virsh dumpxml', where we only cared about balloon size and not the rest of the statistics, and where we do NOT want to hang waiting on the guest; for that case, the solution that Dan came up with was adding a balloon event, and using the event instead of a query. The other usage is that we have an API where the user can specifically request all the stats; and there, we DO want to block on the guest to get the stats, and would prefer getting the stats in a single command (but can tolerate getting the stats via 6 separate commands, if that's what it takes). It is this second usage that has been broken in libvirt ever since we crippled the stats collection in qemu because of the undesirable hang in the first cas= e. > Something I have been wondering if whether it's possible to have only > one property (say balloon-statistics) and return all properties in a > dict. QOM properties return a visitor, so maybe that's possible. >=20 > I'll check that. Ah, that would be a nice trick - querying a single QOM property that turns out to be a dict exposing multiple sub-properties at once. And if you can get that to work, you are back to your goal of no new QMP command= =2E --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig34AAF1556DF9A2E2A726B3AF 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 undefined - http://www.enigmail.net/ iQEcBAEBCAAGBQJQ01rBAAoJEKeha0olJ0Nq6gIH/irIzEv+esBL6UAkuM2BDbmb nizUlx2t/yzH+R0g06iB9ZklphDzAJ8q/45YLqOStM2aLeqjjNqdGplWF6GsAXjI WoHl/g8iMbkCLq0/PRFBVVm7yxZjIpH91O1WpFYjR57NPh4Dk0NKHZ7+h50llKsh /XpxurFoZRwxAmD+80or9FObWJZZK53kxClao4J/iGZUiufz3oM+x280F9alz+Zr +3B7M+CosevXDDjvEC5urxCnwzxCtBDY49eigTN2L82rtAEJCF4y6fQXtXN7x4Mv ZwzJkslH89bNs30TYPa5uGuxPqyAV4t4BJUre4pSQHWomQZVllX8EEpMQa1joSc= =uX/v -----END PGP SIGNATURE----- --------------enig34AAF1556DF9A2E2A726B3AF--