From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBm2m-0008RV-95 for qemu-devel@nongnu.org; Thu, 15 Jan 2015 10:09:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBm2d-0000w1-Lm for qemu-devel@nongnu.org; Thu, 15 Jan 2015 10:09:08 -0500 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:36415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBm2d-0000va-Fi for qemu-devel@nongnu.org; Thu, 15 Jan 2015 10:08:59 -0500 Received: by mail-we0-f175.google.com with SMTP id k11so15225403wes.6 for ; Thu, 15 Jan 2015 07:08:58 -0800 (PST) Date: Thu, 15 Jan 2015 15:08:56 +0000 From: Stefan Hajnoczi Message-ID: <20150115150856.GC4005@stefanha-thinkpad.redhat.com> References: <1420823990-31461-1-git-send-email-marcandre.lureau@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GZVR6ND4mMseVXL/" Content-Disposition: inline In-Reply-To: <1420823990-31461-1-git-send-email-marcandre.lureau@gmail.com> Subject: Re: [Qemu-devel] [PATCH] WIP: add GCoroutine support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau Cc: kwolf@redhat.com, pbonzini@redhat.com, Peter Lieven , qemu-devel@nongnu.org, stefanha@redhat.com --GZVR6ND4mMseVXL/ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 09, 2015 at 06:19:50PM +0100, Marc-Andr=E9 Lureau wrote: > Learn to use the GCoroutine library instead of qemu own coroutine > implementation. >=20 > GCoroutine is hosted on github: > https://github.com/elmarco/gcoroutine >=20 > This allows to share the same coroutine implementation between various > projects (gtk-vnc and spice-gtk). It is related to the effort to push > coroutine support in GLib. See also: > https://bugzilla.gnome.org/show_bug.cgi?id=3D719362 >=20 > Notes: > - there are no GCoroutine releases, the API isn't frozen > - this patch hasn't been thoroughly tested > - GCoroutine doesn't implement pools yet > - GCoroutine is missing sigaltstack based coroutines > - spice-gtk and gtk-vnc patches are being worked on The GCoroutine API has a very direct mapping to QEMU's coroutine interface: https://github.com/elmarco/gcoroutine/blob/master/src/gcoroutine.h I like that you added gpointer arguments and return values to enter/yield. When writing the QEMU coroutine interface I dropped them because I felt we wouldn't need them, but they are appropriate in a general-purpose coroutine library. Kevin Lieven and Peter Lieven are currently measuring and improving coroutine performance in the QEMU block layer. I guess this will result in code changes to QEMU's coroutines implementation over the next weeks. Stefan --GZVR6ND4mMseVXL/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUt9gIAAoJEJykq7OBq3PIFRkH/0z43Ed6njKzTXn8zAZOKpTN tk0+HIZrhFqeJcGXuKYnUsC494490EFT1pJ/auqbIdfmvqEunOalHVR0glGz3Qk5 NjPWxKOsJ44DSkJYxyFUPDqEJDg5LZZbkwav49oSl5yRygrjYR4ltz8MpIzQCXqr T/gxFkRQw/mLxP+tZB7IsHgeNmO60Js0t9eGLZrZ1PL4VEmzQSp7vfOaKllg3TrD F0OaOC0fvRTwwRHa9emDqhdhN7+FNB5NeuBiXCsz6LEc2pV7BrWHQ+J7j3QhIP1H +t7aqU/xeqjLocQcpiCbQgLP7g7ss1daSlYLS6lRyOHgjCcsDPRU+Kx8eTNX+sE= =mSVC -----END PGP SIGNATURE----- --GZVR6ND4mMseVXL/--