From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JGz4u-0006Cy-7s for qemu-devel@nongnu.org; Mon, 21 Jan 2008 11:00:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JGz4s-0006Bk-L9 for qemu-devel@nongnu.org; Mon, 21 Jan 2008 11:00:51 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JGz4s-0006BW-DT for qemu-devel@nongnu.org; Mon, 21 Jan 2008 11:00:50 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JGz4s-0001aM-1K for qemu-devel@nongnu.org; Mon, 21 Jan 2008 11:00:50 -0500 From: Paul Brook Subject: Re: [Qemu-devel] threads on qemu Date: Mon, 21 Jan 2008 16:00:39 +0000 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801211600.40414.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "C.W. Betts" On Monday 21 January 2008, C.W. Betts wrote: > I was thinking, maybe qemu could use threads for at least every processor > it emulates (on emulated smp computers) and, at the most, every single > device emulated. This would help users who have multiple cores, but it > might impact performance on those of us who don't. Please read previous discussions on this mailing list. I'd be surprised if putting device emulation in a separate thread makes much difference. The really slow bits (waiting for IO to complete) are already asynchronous. Most other device accesses are very short, so you'd waste more time through synchronisation than you gain from putting them is a separate thread. Splitting multiple CPUs into multiple threads is extremely hard to get right, especially when your host system provides less strict ordering and atomicity guarantees than those required by the guest system. Paul