From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S11zf-0002MV-C3 for qemu-devel@nongnu.org; Fri, 24 Feb 2012 15:43:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S11zd-0007Tf-0g for qemu-devel@nongnu.org; Fri, 24 Feb 2012 15:43:55 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:59934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S11zc-0007TQ-PH for qemu-devel@nongnu.org; Fri, 24 Feb 2012 15:43:52 -0500 Received: by eeit10 with SMTP id t10so666324eei.4 for ; Fri, 24 Feb 2012 12:43:51 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F47F685.5010000@redhat.com> Date: Fri, 24 Feb 2012 21:43:49 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <4F47DEB1.7080009@redhat.com> <4F47E37A.6000702@codemonkey.ws> In-Reply-To: <4F47E37A.6000702@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] converting the block layer from coroutines to threads List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel , Stefan Hajnoczi , "Michael S. Tsirkin" On 02/24/2012 08:22 PM, Anthony Liguori wrote: > Virtio really wants each virtqueue to be processed in a separate > thread. On a multicore system, there's considerable improvement doing > this. I think that's where we ought to start. Well, that's where we ought to *get*. Stefan's work is awesome but with the current feature set it would be hard to justify it upstream. To get it upstream we need to generalize it and make it work well with the block layer. And vice versa make the block layer work well with threads, which is what I care about here. > We really just need the block layer to be re-entrant, we don't > actually need qcow2 or anything else that uses coroutines to use full > threads. Once you can issue I/O from two threads at the same-time (such as streaming in the iothread and guest I/O in the virtqueue thread), everything already needs to be thread-safe. It is a pretty short step from there to thread pools for everything. > Or at least, as far as I know, we don't have any performance data to > suggest that we do. No, it's not about speed, though of course it only works if there is no performance dip. It is just an enabling step. That said, my weekend officially begins now. :) Paolo