[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] coroutine: make pool size dynamic
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] coroutine: make pool size dynamic |
Date: |
Thu, 3 Jul 2014 20:29:02 +0200 |
On Thu, Jul 3, 2014 at 3:59 PM, Eric Blake <address@hidden> wrote:
> On 07/03/2014 07:52 AM, Stefan Hajnoczi wrote:
>> Allow coroutine users to adjust the pool size. For example, if the
>> guest has multiple emulated disk drives we should keep around more
>> coroutines.
>>
>> Signed-off-by: Stefan Hajnoczi <address@hidden>
>> ---
>> include/block/coroutine.h | 11 +++++++++++
>> qemu-coroutine.c | 25 +++++++++++++++++++------
>> 2 files changed, 30 insertions(+), 6 deletions(-)
>>
>
>> +
>> +void qemu_coroutine_adjust_pool_size(int n)
>> +{
>> + qemu_mutex_lock(&pool_lock);
>> +
>> + pool_max_size += n;
>
> Where do you check that this doesn't fall below a bare-minimum
> acceptable level? Is it worth assert(pool_max_size >= 64)?
I don't. I think you are right; it's worth checking.
Stefan