On 03/25/2011 04:22 PM, Zane Bitter wrote:
> 
> On 2011/03/25, at 12:01, Steven Dake wrote:
> 
>> On 03/25/2011 06:14 AM, Russell Bryant wrote:
>>> On Fri, Mar 25, 2011 at 12:10 AM, Steven Dake <[email protected]> wrote:
>>>> On 03/24/2011 06:56 PM, Zane Bitter wrote:
>>>>>
>>>>> Did we reach a consensus on whether locking is required on the free list 
>>>>> or
>>>>> if TLS is sufficient?
>>>>>
>>>>
>>>> Locking is required - allocation can happen in totemsrp_mcast in thread
>>>> A while free can occur in message_handler_orf_token (via messages_free)
>>>> in thread B.
>>>
>>> So, TLS should be used then?  Wouldn't locking on a free list be worse
>>> than no free list at all?
> 
> Probably not worse (since malloc() also has to lock its free list), but 
> certainly not much better.
> 
>> When I said locking, what i meant is mutual exclusion, so yes, tls would
>> likely be the best choice.
> 
> Agree it's the best choice if the usual case is to alloc and free in the same 
> thread (more accurately, if the number of allocs and frees is usually roughly 
> balanced for each thread). If it's always allocating in one thread and 
> freeing in another then a per-thread free list is no better. It sounds like 
> the former is the case here though?
> 
If we originate a message, we alloc in 1 thread and free in another.  If
we receive a message we alloc and free in the same thread.  I would
expect with a typical mix the receive operation is more likely to occur
especially as cluster size grows.

Regards
-steve

>> Regards
>> -steve
>>
>>
>>> --
>>> Russell Bryant
>>
> 

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to