[Top][All Lists]
[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
[Qemu-devel] [PATCH 2/3] Move threadlets infrastructure to qemu-threadlets.c, Arun R Bharadwaj, 2010/11/10
[Qemu-devel] [PATCH 3/3] Add helper functions to enable virtio-9p make use of the threadlets, Arun R Bharadwaj, 2010/11/10