From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STyti-0005vr-In for qemu-devel@nongnu.org; Mon, 14 May 2012 13:17:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STytf-0003Q8-Rk for qemu-devel@nongnu.org; Mon, 14 May 2012 13:17:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STytf-0003Pd-Ic for qemu-devel@nongnu.org; Mon, 14 May 2012 13:17:23 -0400 Message-ID: <4FB13E1E.6010605@redhat.com> Date: Mon, 14 May 2012 11:17:18 -0600 From: Eric Blake MIME-Version: 1.0 References: <1336763987-10920-1-git-send-email-lcapitulino@redhat.com> <4FB13B94.4070903@redhat.com> In-Reply-To: <4FB13B94.4070903@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig614B7FF812B01396A43250E3" Subject: Re: [Qemu-devel] [PATCH 0/2]: qemu-ga: make shutdown & suspend synchronous List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Privoznik Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, Luiz Capitulino This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig614B7FF812B01396A43250E3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/14/2012 11:06 AM, Michal Privoznik wrote: > On 11.05.2012 21:19, Luiz Capitulino wrote: >> The main motivation for this series is fixing two possible race condit= ions >> in the guest-suspend-* API due to the complexity that arose from the w= ay >> we handle terminated children processes today. Full details in the fir= st >> patch. >> >> This series applies on top of my two other qemu-ga series submitted >> previously: >> >> http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg00999.html >> >> http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg01507.html >> >> qapi-schema-guest.json | 56 ++++++++++------ >> qapi/qmp-core.h | 10 ++- >> qapi/qmp-dispatch.c | 8 ++- >> qapi/qmp-registry.c | 4 +- >> qemu-ga.c | 40 ++++++------ >> qga/commands-posix.c | 162 ++++++++++++++++++-------------------= --------- >> qga/guest-agent-core.h | 4 ++ >> scripts/qapi-commands.py | 14 +++- >> 8 files changed, 154 insertions(+), 144 deletions(-) >> >=20 > Okay, this is definitely an enhancement and fix of bogus implementation= =2E > One thing that I'd like to ask is - how can user distinguish between > these implementations. I am asking basically from libvirt POV. > Because if I assume I am dealing with the previous implementation and > thus waiting for the {'return':{}} before I can return form an API, but= > the GA actually uses the new implementation I will block endlessly. I think the point was that you would block endlessly waiting for the {'return':{}} anyways, even with the old implementation, because there was no guarantee that the guest agent could issue the reply in a timely manner. Therefore, the only sane implementation in libvirt is to assume that success will not be reported via the guest agent, and that libvirt must _always_ probe for the listed side effects (a change in guest status, qemu exiting, an event, or so forth), and optionally have a timeout if the associated timeout does not occur in a reasonable time. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig614B7FF812B01396A43250E3 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/ iQEcBAEBCAAGBQJPsT4eAAoJEKeha0olJ0NqucMH/2YF3++uGVB0OjJFQKzoKcJJ peo7kTNVIILwvkRkxKRgk/TxyP9kw4ex6lNXewxAYV9Cy8nkCaCOPemyXOwXpXVE h9+ThzrKxBXfm6mjDcBQxVutdq6E++0CEDm9RoyHV3zgdEWL6T7CXJL5odAOD/hP 54pUZaLbTtOlCzIhvrblv2S9/RiuKk6yVMs+DaQ0In2TilTejQhSo8CSfgrJCc30 Gc7Dy/I556GLyVHvar+Zqz36Q0lG3PTNRvA/vMOp6fAyCsQEJXE/V4/SBV1mQxly uuahHVNR9jcU5DfOWs83ZjPmgavG55palABBqA9j1LAWn1MWorQKnu6r3J2+roQ= =pN03 -----END PGP SIGNATURE----- --------------enig614B7FF812B01396A43250E3--