From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LhRoe-0003li-G1 for qemu-devel@nongnu.org; Wed, 11 Mar 2009 13:02:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LhRod-0003l3-Dm for qemu-devel@nongnu.org; Wed, 11 Mar 2009 13:01:59 -0400 Received: from [199.232.76.173] (port=56048 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LhRod-0003kq-89 for qemu-devel@nongnu.org; Wed, 11 Mar 2009 13:01:59 -0400 Received: from mx2.redhat.com ([66.187.237.31]:55090) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LhRob-0000Ff-Fg for qemu-devel@nongnu.org; Wed, 11 Mar 2009 13:01:58 -0400 Date: Wed, 11 Mar 2009 13:58:34 -0300 From: Marcelo Tosatti Subject: Re: [Qemu-devel] [patch 1/2] qemu: sem/thread helpers Message-ID: <20090311165834.GA16489@amt.cnet> References: <20090311161645.344003675@localhost.localdomain> <20090311161942.482576079@localhost.localdomain> <200903111648.02530.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200903111648.02530.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: Paul Brook Cc: Anthony Liguori , qemu-devel@nongnu.org On Wed, Mar 11, 2009 at 04:48:01PM +0000, Paul Brook wrote: > > +QemuSem qemu_sem; > > It's entirely unclear what is actually protected by the semaphore. Everything at the moment. > What exactly does the IO thread do? AFAICS device MMIO is still run from > within the CPU thread. Device code is not threadsafe (and probably never will > be), so you can't run any of the device callbacks in the IO thread either. > Doesn't seem like there's a lot left for it to do... There are things which can run in parallel. VNC dirty update, read()'ing of data into QEMU, for two examples.