From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [Qemu-devel] Re: segmentation fault in qemu-kvm-0.14.0 Date: Wed, 09 Mar 2011 11:12:53 +0100 Message-ID: <4D7752A5.6080405@web.de> References: <2640D58E-2101-47FA-99B6-28815666651E@dlh.net> <4D772E4C.6020604@web.de> <4D774282.9060102@web.de> <4D774F54.2050004@web.de> <4D77503D.6070605@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6CA112FB35B5D30AF669A32C" Cc: Peter Lieven , qemu-devel , kvm@vger.kernel.org To: Corentin Chary Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:39124 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757138Ab1CIKM4 (ORCPT ); Wed, 9 Mar 2011 05:12:56 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6CA112FB35B5D30AF669A32C Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2011-03-09 11:06, Corentin Chary wrote: >> Probably the best way is to make vnc stop fiddling with >> qemu_set_fd_handler2, specifically in threaded mode. >> Why does it need to set/reset the write handler all the time? >=20 > I didn't write the original code, but it's probably to avoid calling a > write handler when there is no data to write. That would make select() > busy loop when there are actually no data to write. > There is also the vnc_disconnect_start() case when the socket seems to > be broken and we remove all handlers. >=20 >> The other question is: Who's responsible for writing to the client >> socket in threaded mode? Only the vnc thread(s), or also other qemu >> threads? In the former case, just avoid setting a write handler at all= =2E >=20 > Cheap stuff is done by the main thread (cursor, etc...). The thread > only do framebuffer updates. And both are synchronized with a vnc-private lock only? The problem with this model is the non-threaded qemu execution model. Even if we acquire the global mutex to protect handler updates against the main select loop, this won't help here. So vnc-threading likely needs to be made dependent on --enable-io-thread. Jan --------------enig6CA112FB35B5D30AF669A32C 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.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk13UqUACgkQitSsb3rl5xTxVACfcAfx+t7VZZ2aUcZw8m3kirFF xicAnj2cVneCyRg3nJ3jHFTwWA5PoGW9 =xOzI -----END PGP SIGNATURE----- --------------enig6CA112FB35B5D30AF669A32C--