Re: Squid-smp : Please discuss

From: Adrian Chadd <adrian_at_squid-cache.org>
Date: Tue, 15 Sep 2009 15:18:49 +1000

Guys,

Please look at what other multi-CPU network applications do, how they
work and don't work well, before continuing this kind of discussion.

Everything that has been discussed has already been done to death
elsewhere. Please don't re-invent the wheel, badly.

Adrian

2009/9/15 Robert Collins <robertc_at_robertcollins.net>:
> On Tue, 2009-09-15 at 14:27 +1200, Amos Jeffries wrote:
>>
>>
>> RefCounting done properly forms a lock on certain read-only types like
>> Config. Though we are currently handling that for Config by leaking
>> the
>> memory out every gap.
>>
>> SquidString is not thread-safe. But StringNG with its separate
>> refcounted
>> buffers is almost there. Each thread having a copy of StringNG sharing
>> a
>> SBuf equates to a lock with copy-on-write possibly causing issues we
>> need
>> to look at if/when we get to that scope.
>
> General rule: you do /not/ want thread safe objectse for high usage
> objects like RefCount and StringNG.
>
> synchronisation is expensive; design to avoid synchronisation and hand
> offs as much as possible.
>
> -Rob
>
>
Received on Tue Sep 15 2009 - 05:40:10 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 15 2009 - 12:00:04 MDT