qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 04/15] coroutine: add a knob to disable the shar


From: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH 04/15] coroutine: add a knob to disable the shared release pool
Date: Tue, 28 Jun 2016 12:47:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

Am 28.06.2016 um 12:41 schrieb Paolo Bonzini:

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...

You are right, I was having this patch prior to reducing the stack size.
In fact its 2 * 2^6 coroutines. But maybe its worth of thinking making
the release_pool the same max size as the alloc_pool? Otherwise when
the release_pool is stolen it could make the alloc_pool also that big.

Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]