From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmQ4m-0006yE-Th for qemu-devel@nongnu.org; Thu, 28 Jul 2011 08:52:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmQ4l-0003nP-S4 for qemu-devel@nongnu.org; Thu, 28 Jul 2011 08:52:32 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:40498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmQ4l-0003nL-Pc for qemu-devel@nongnu.org; Thu, 28 Jul 2011 08:52:31 -0400 Received: by gxk26 with SMTP id 26so2111451gxk.4 for ; Thu, 28 Jul 2011 05:52:31 -0700 (PDT) Message-ID: <4E315B88.8080104@codemonkey.ws> Date: Thu, 28 Jul 2011 07:52:24 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20110728120931.GB17045@lst.de> In-Reply-To: <20110728120931.GB17045@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Block layer roadmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: Kevin Wolf , devin122@gmail.com, Stefan Hajnoczi , Jagane Sundar , Dor Laor , qemu-devel , Markus Armbruster , Feiran Zheng , Frediano Ziglio , Jes Sorensen , Paolo Bonzini On 07/28/2011 07:09 AM, Christoph Hellwig wrote: > On Wed, Jul 27, 2011 at 01:37:31PM +0100, Stefan Hajnoczi wrote: >> Coroutines in the block layer [Kevin] >> * Programming model to simplify block drivers without blocking QEMU threads > > Can anyone explain what the whole point of this is? It really just is > a bit of syntactic sugar for the current async state machines. What does > it buy us over going for real threading? It is threading--just with a common locking model where a single big lock is held to make up for the fact that most of QEMU isn't reentrant. By restructuring the code to be threaded, we can incrementally remove the big lock if we audit for use of non-reentrant functions and introduce more granular locking. The whole ucontext/setjmp thing is just an optimization. I would hope it entirely disappears long term as we promote coroutines to full threads. Regards, Anthony Liguori > >