qemu-devel
[Top][All Lists]
Advanced

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

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


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 1/3] Make paio subsystem use threadlets infrastructure
Date: Wed, 10 Nov 2010 20:13:29 +0000

On Wed, Nov 10, 2010 at 5:54 PM, Arun R Bharadwaj
<address@hidden> wrote:
> * Stefan Hajnoczi <address@hidden> [2010-11-10 13:45:29]:
>> On Wed, Nov 10, 2010 at 1:19 PM, Arun R Bharadwaj
>> <address@hidden> 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.
>>  I just want to share this idea, I don't know if it's necessary to
>> implement it or if it could even work without a race condition.
>>
>
> I did not understand exactly why we are going to see a performane hit.
> We will be doing a broadcast only after the aio_thread has finished
> the work right? So how is this going to affect performance even if we
> do a useless broadcast?

If aio_thread() broadcasts before raising the signal then POSIX aio
request completion is delayed by the time it takes to broadcast.  I
don't know if it matters though.

Stefan



reply via email to

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