From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42732) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuL6Q-0002DK-Rx for qemu-devel@nongnu.org; Fri, 28 Nov 2014 07:56:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuL6K-0002cu-Lg for qemu-devel@nongnu.org; Fri, 28 Nov 2014 07:56:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuL6K-0002cm-Cj for qemu-devel@nongnu.org; Fri, 28 Nov 2014 07:56:44 -0500 Message-ID: <547870FF.70502@redhat.com> Date: Fri, 28 Nov 2014 13:56:31 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1417084026-12307-1-git-send-email-pl@kamp.de> <1417084026-12307-4-git-send-email-pl@kamp.de> <547753F7.2030709@redhat.com> <54782EC3.10005@kamp.de> <54784E55.6060405@redhat.com> <54785067.60905@kamp.de> <547858FF.5070602@redhat.com> <54785AA5.9070409@kamp.de> <54785B2E.9070203@redhat.com> <54785D60.1070306@kamp.de> <5478609B.8060503@kamp.de> <547869DE.3080907@redhat.com> <54786CF5.2060705@kamp.de> <54786E52.6050209@redhat.com> <54786F71.2090706@kamp.de> In-Reply-To: <54786F71.2090706@kamp.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 3/3] qemu-coroutine: use a ring per thread for the pool List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , ming.lei@canonical.com, Kevin Wolf , Stefan Hajnoczi , "qemu-devel@nongnu.org" , Markus Armbruster On 28/11/2014 13:49, Peter Lieven wrote: >>> Idea: >>> >> If the release_pool is full why not put the coroutine in the thread alloc_pool instead of throwing it away? :-) >> > Because you can only waste 64 coroutines per thread. But numbers cannot s/only// >> > be sneezed at, so it's worth doing it as a separate patch. > What do you mean by that? If I use dataplane I will fill the global pool and never use it okay, but > then I use thread local storage only. So I get the same numbers as in my thread local storage only version. Right. I didn't want to waste the coroutines. But it's not 64 coroutines per VCPU thread, it's just 64 coroutines for the global iothread because all the dataplane threads are guaranteed to use ioeventfd. Let's do it. :) Can I add your Signed-off-by to the patch? Paolo > Maybe it is an idea to tweak the POOL_BATCH_SIZE * 2 according to what is really attached. If we > have only dataplane or ioeventfd it can be POOL_BATCH_SIZE * 0 and we even won't waste those > coroutines oxidating in the global pool.