From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtwJh-0003o3-VA for qemu-devel@nongnu.org; Thu, 27 Nov 2014 05:29:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtwJY-0005mP-KK for qemu-devel@nongnu.org; Thu, 27 Nov 2014 05:28:53 -0500 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:59140 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtwJY-0005lq-Aa for qemu-devel@nongnu.org; Thu, 27 Nov 2014 05:28:44 -0500 From: Peter Lieven Date: Thu, 27 Nov 2014 11:27:03 +0100 Message-Id: <1417084026-12307-1-git-send-email-pl@kamp.de> Subject: [Qemu-devel] [RFC PATCH 0/3] qemu-coroutine: use a ring per thread for the pool List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, benoit@irqsave.net, ming.lei@canonical.com, Peter Lieven , armbru@redhat.com, mreitz@redhat.com, stefanha@redhat.com, pbonzini@redhat.com This series removes the need for locking the coroutine pool. During collection of perf data it showed up that there is serious time spend in locking the coroutine pool during heavy I/O from the vServer. This also needs serious benchmarking. Using Kevins qemu-img bench there is a 3-4% speedup. Inside vServers it seems to heavily dependend on the individual CPU and SMP configuration. I just wanted to post these patches here to discuss if this is an idea that we should look futher into. KNOWN ISSUES: - the I/O thread qobject is not destroyed on qemu termination. These seems to be the case for all qobjects?! Therefore the per thread coroutine pool is not cleaned up. - without ioeventfd there is effectively no longer a coroutine pool since the coroutines are created in a different thread then they are freed. Peter Lieven (3): Revert "coroutine: make pool size dynamic" block/block-backend.c: remove coroutine pool reservation qemu-coroutine: use a ring per thread for the pool block/block-backend.c | 6 ---- include/block/coroutine.h | 13 +------- iothread.c | 3 ++ qemu-coroutine.c | 78 +++++++++++++++------------------------------ 4 files changed, 30 insertions(+), 70 deletions(-) -- 1.7.9.5