Am 27.11.2014 um 17:40 schrieb Paolo Bonzini:
>
> On 27/11/2014 11:27, Peter Lieven wrote:
>> +static __thread struct CoRoutinePool {
>> +    Coroutine *ptrs[POOL_MAX_SIZE];
>> +    unsigned int size;
>> +    unsigned int nextfree;
>> +} CoPool;
>>  
> The per-thread ring unfortunately didn't work well last time it was
> tested.  Devices that do not use ioeventfd (not just the slow ones, even
> decently performing ones like ahci, nvme or megasas) will create the
> coroutine in the VCPU thread, and destroy it in the iothread.  The
> result is that coroutines cannot be reused.
>
> Can you check if this is still the case?

I already tested at least for IDE and for ioeventfd=off. The coroutine
is created in the vCPU thread and destroyed in the I/O thread.

I also havea more complicated version which sets per therad coroutine pool only
for dataplane. Avoiding the lock for dedicated iothreads.

For those who want to take a look:

https://github.com/plieven/qemu/commit/325bc4ef5c7039337fa785744b145e2bdbb7b62e

Peter

Reply via email to