From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTsI3-0006aO-8X for qemu-devel@nongnu.org; Thu, 23 Jul 2009 03:00:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTsHy-0006a0-Md for qemu-devel@nongnu.org; Thu, 23 Jul 2009 03:00:30 -0400 Received: from [199.232.76.173] (port=46919 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTsHy-0006Zx-H8 for qemu-devel@nongnu.org; Thu, 23 Jul 2009 03:00:26 -0400 Received: from mx20.gnu.org ([199.232.41.8]:19572) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTsHx-0008Jx-NZ for qemu-devel@nongnu.org; Thu, 23 Jul 2009 03:00:26 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTsHw-0003AL-Mx for qemu-devel@nongnu.org; Thu, 23 Jul 2009 03:00:25 -0400 Message-ID: <4A680A87.7020100@web.de> Date: Thu, 23 Jul 2009 09:00:23 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1247064963.3270.63.camel@blaa> <1247065048-15706-1-git-send-email-markmc@redhat.com> <1247065048-15706-2-git-send-email-markmc@redhat.com> <1247065048-15706-3-git-send-email-markmc@redhat.com> <4A54BABD.3040903@redhat.com> <1247069035.3270.82.camel@blaa> <4A54C634.30007@redhat.com> <4A54E0B3.8090305@codemonkey.ws> <4A54E160.9000900@redhat.com> <4A54E3BC.40306@codemonkey.ws> <4A54E64E.8090100@redhat.com> <4A54EA7D.4040602@codemonkey.ws> <4A54F8F2.2080103@redhat.com> <1248194411.7126.17.camel@blaa> <4A667780.5040803@codemonkey.ws> <1248250169.2867.33.camel@blaa> In-Reply-To: <1248250169.2867.33.camel@blaa> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig26D25598A39AFA7E3693E6FB" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 3/5] Add getfd and closefd monitor commands List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark McLoughlin Cc: Avi Kivity , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig26D25598A39AFA7E3693E6FB Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Mark McLoughlin wrote: > On Tue, 2009-07-21 at 21:20 -0500, Anthony Liguori wrote: >> Mark McLoughlin wrote: >>> My take on it is that we're all agreed that it's never valid with the= >>> current monitor protocol for a client to queue up multiple fds. It's = a >>> synchronous protocol, you can't send multiple commands at once. >>> =20 >> I think there's a subtle point that was lost in the thread. While we'= ll=20 >> only need to queue one fd per MonitorState, we'll still need to deal=20 >> with multiple fds per CharDriverState. >=20 > Why? For a theoretical use case, or for the current monitor interface? >=20 There can be multiple monitors attached at the same time, already today. > If the latter, then I don't follow. >=20 > The flow is as follows: >=20 > client server > ------ ------ > send request -> > wait for response =20 > read request > process msgfd, allowing only a single fd > monitor handles request > <- send reply > handle response close msgfd if unused > send next request -> >=20 > If the client sends multiple requests at once, it is broken - it must > wait for a "(qemu) " reply before sending another request. >=20 > If the client sends multiple fds in a single request, it is broken - no= > monitor commands support multiple fds. >=20 > If the client is broken and sends multiple fds, we only read the first > one and the kernel frees the others. >=20 > If the client sends an fd along with a request which does not require a= n > fd, we just close that fd after we've processed the request. >=20 > If we get a new protocol which allows multiple requests per message or > multiple fds per request, we can easily add a queue then. >=20 > Cheers, > Mark. >=20 Jan --------------enig26D25598A39AFA7E3693E6FB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkpoCocACgkQniDOoMHTA+kNsACffrM6VCEtDgiDY9Sd1WEw9sDy xmEAniRrAeemg13SBQO/S1Hw68JkSTD1 =tN6N -----END PGP SIGNATURE----- --------------enig26D25598A39AFA7E3693E6FB--