qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 1/3] Make paio subsystem use threadlets infrastr


From: Stefan Hajnoczi
Subject: [Qemu-devel] Re: [PATCH 1/3] Make paio subsystem use threadlets infrastructure
Date: Thu, 11 Nov 2010 09:26:14 +0000

On Thu, Nov 11, 2010 at 8:41 AM, Paolo Bonzini <address@hidden> wrote:
> On 11/10/2010 02:45 PM, Stefan Hajnoczi wrote:
>>
>> I wonder if the condition variable has a measurable performance
>> overhead.  We unconditionally broadcast on paiocb completion.  One
>> idea would be to keep a counter of waiters (should only ever be 0 or
>> 1) protected by aiocb_mutex and broadcast only when there is a waiter.
>
> This should be handled anyway by the pthreads library.  If we are sure there
> is only one waiter at most, you can change broadcast to signal but that
> would already be microoptimization.
>
> Alternatively, you can use futexes to implement a completion signal (similar
> to Win32 events).  But it seems too much effort.

Yes, let's use standard cond vars for now.

Stefan



reply via email to

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