Received: from eggs.gnu.org ([208.118.235.92]:49690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfUAf-0008TG-IO for qemu-devel@nongnu.org; Thu, 23 May 2013 07:59:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfUAX-000436-WF for qemu-devel@nongnu.org; Thu, 23 May 2013 07:59:01 -0400 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:49518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfUAX-00042j-Ns for qemu-devel@nongnu.org; Thu, 23 May 2013 07:58:53 -0400 Received: by mail-we0-f182.google.com with SMTP id q57so1778928wes.13 for ; Thu, 23 May 2013 04:58:52 -0700 (PDT) Date: Thu, 23 May 2013 13:58:45 +0200 From: Stefan Hajnoczi Message-ID: <20130523115845.GH9093@stefanha-thinkpad.redhat.com> References: <1368798686-25213-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1368798686-25213-1-git-send-email-stefanha@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/2] coroutine: dataplane support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Paolo Bonzini , "Shergill, Gurinder" , "Vinod, Chegu" , qemu-devel@nongnu.org On Fri, May 17, 2013 at 03:51:24PM +0200, Stefan Hajnoczi wrote: > There is ongoing work to enable multiple event loop threads. This will allow > QEMU itself to take advantage of SMP and reduce Big QEMU Lock (BQL) contention. > This series is one step in that effort. > > These patches make coroutines safe in a multi-event loop/multi-threaded world. > I have successfully tested them running qcow2 in a dataplane thread (further > patches are required which I'll be sending soon). > > Patch 1 protects the global coroutine freelist with a lock :). > > Patch 2 drops the CoQueue dependency on AioContext. This allows CoMutex and > CoRwlock to operate in a dataplane thread whereas previously we always > scheduled coroutines in the QEMU iothread. > > Stefan Hajnoczi (2): > coroutine: protect global pool with a mutex > coroutine: stop using AioContext in CoQueue > > include/block/coroutine_int.h | 4 ++++ > qemu-coroutine-lock.c | 56 ++++++++++++++++--------------------------- > qemu-coroutine.c | 23 ++++++++++++++++-- > trace-events | 2 +- > 4 files changed, 47 insertions(+), 38 deletions(-) > > -- > 1.8.1.4 > > Applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan