From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuFWf-0008RH-0c for qemu-devel@nongnu.org; Thu, 18 Aug 2011 23:13:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuFWd-0005F4-Hu for qemu-devel@nongnu.org; Thu, 18 Aug 2011 23:13:40 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:45025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuFWd-0005F0-Br for qemu-devel@nongnu.org; Thu, 18 Aug 2011 23:13:39 -0400 Received: by pzk37 with SMTP id 37so4801990pzk.29 for ; Thu, 18 Aug 2011 20:13:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20110819025943.GA53608@cs.nctu.edu.tw> References: <20110818023558.GA66298@cs.nctu.edu.tw> <20110819025943.GA53608@cs.nctu.edu.tw> Date: Fri, 19 Aug 2011 04:13:37 +0100 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Multi-threaded user program support? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?6Zmz6Z+L5Lu7?= Cc: qemu-devel@nongnu.org On 19 August 2011 03:59, =E9=99=B3=E9=9F=8B=E4=BB=BB wrote: >> More generally and not x86-specific, there are problems with >> the multithreaded user-mode support which I suspect exist because >> nobody has ever sat down and worked out a coherent design for it, >> including what might need to be thread-local and what locking >> is required. So the result is that it mostly works but if you > > =C2=A0You mean some QEMU data structures need to be thread-local or lock > protected in order to emulate guest multi-threaded program correctly? Approximately, yes (the third option being "redesign the data structure so it can be sensibly protected"). See https://bugs.launchpad.net/qemu/+bug/668799 for discussion of one example. None of this is impossibly difficult; it just requires that somebody sits down and actually works through the problems and fixes them. -- PMM