From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58536 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmUcQ-0003FW-Es for qemu-devel@nongnu.org; Mon, 07 Feb 2011 12:11:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmUcD-0002lY-12 for qemu-devel@nongnu.org; Mon, 07 Feb 2011 12:11:05 -0500 Received: from david.siemens.de ([192.35.17.14]:31518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmUcC-0002lC-NV for qemu-devel@nongnu.org; Mon, 07 Feb 2011 12:11:04 -0500 Message-ID: <4D50279B.5010102@siemens.com> Date: Mon, 07 Feb 2011 18:10:51 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1295902845-29807-1-git-send-email-aliguori@us.ibm.com> <1295902845-29807-3-git-send-email-aliguori@us.ibm.com> <4D3DFD20.8060004@linux.vnet.ibm.com> <20110125091741.GB30239@edde.se.axis.com> <20110125133453.GC5427@amt.cnet> <20110207101255.GA20413@amt.cnet> <20110207160350.GA26332@amt.cnet> <4D501C71.7090708@redhat.com> In-Reply-To: <4D501C71.7090708@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 2/7] Enable I/O thread and VNC threads by default List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Anthony Liguori , Stefan Hajnoczi , Marcelo Tosatti , qemu-devel@nongnu.org, Anthony Liguori , Paul Brook , "Edgar E. Iglesias" , Arun Bharadwaj On 2011-02-07 17:23, Paolo Bonzini wrote: > On 02/07/2011 05:03 PM, Marcelo Tosatti wrote: >> Is there any other issue that prevents turning CONFIG_IOTHREAD on by >> default? > > I think Windows support. > > Signal support is actually easy because we can "hack" the IPI as > "suspend the VCPU thread+do work in the iothread context+resume the VCPU > thread" (the IPI handler doesn't longjmp). > > Threading primitives support is tricky but not hard (there is lots of > code around, especially if you can make assumptions such as "always hold > the mutex while signaling a cond. variable"). !CONFIG_IOTHREAD code is doomed to bitrot once we switch to default iothread mode. So if Windows support is not converted to a threading model with moderate differences to POSIX, it will likely bitrot a well. Therefore, conversion should be started rather sooner than later (by someone interested in that platform). Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux