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: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH 1/3] Make paio subsystem use threadlets infrastructure
Date: Thu, 11 Nov 2010 09:41:28 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6

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.

Paolo



reply via email to

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