Received: from eggs.gnu.org ([2001:4830:134:3::10]:57610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHqS9-0000Gf-VA for qemu-devel@nongnu.org; Tue, 28 Jun 2016 06:41:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHqS6-0001Op-RR for qemu-devel@nongnu.org; Tue, 28 Jun 2016 06:41:13 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:33260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHqS6-0001Ol-Jn for qemu-devel@nongnu.org; Tue, 28 Jun 2016 06:41:10 -0400 Received: by mail-wm0-x244.google.com with SMTP id r201so4779082wme.0 for ; Tue, 28 Jun 2016 03:41:10 -0700 (PDT) Sender: Paolo Bonzini References: <1467104499-27517-1-git-send-email-pl@kamp.de> <1467104499-27517-5-git-send-email-pl@kamp.de> From: Paolo Bonzini Message-ID: <7b4e4b2d-0de4-148f-6213-648611137771@redhat.com> Date: Tue, 28 Jun 2016 12:41:06 +0200 MIME-Version: 1.0 In-Reply-To: <1467104499-27517-5-git-send-email-pl@kamp.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 04/15] coroutine: add a knob to disable the shared release pool List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven , qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, mst@redhat.com, dgilbert@redhat.com, mreitz@redhat.com, kraxel@redhat.com On 28/06/2016 11:01, Peter Lieven wrote: > the current coroutine freelist implementation has 2 kinds of pools. > One shared release pool between all threads and additionally one > allocation pool per thread. The release pool is especially necessary > if the coroutine is created in a different thread than it is released. > This is e.g. the case if an IDE interface is used. > > But in times of virtio and dataplane the the release pool adds costs > which are not entirely necessary. At first if virtio is used the release > pool tends to fill up to 100% because all coroutines are first handed > back to the release pool. On coroutine create a thread can steal this > release pool and make it its local allocation pool, but during mixed > I/O pattern at the end the release pool is full of useless coroutines > and the alloc_pool has also filled to maximum size. The cost is 2^16 bytes * 2^6 coroutines, that is 4 MB. I don't think this is worth an extra knob that no one will use... Paolo