On Tue, Sep 15, 2009 at 1:18 AM, Adrian Chadd <adrian_at_squid-cache.org> wrote:
> 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
>>
>>
>
Yes synchronization is always expensive . So we must target only those
areas where shared data is updated infrequently. Also if we are making
thread then the amount of work done must be more as compared to
overheads required in thread creation, synchronization & scheduling.
If we try to provide locks to existing data structures then
synchronization factor will definitely affect to our design.
Redesigning of such structures and there behavior is time consuming
and may change whole design of the Squid.
Whatever it may be..........
WE HAVE TO MOVE SQUID TO MULTI-CORE............... because future is
MULTI-CORE......
Anyways still there are many question in my mind but as am new here,
would like to spend some time in analysis of current design
PLEASE cope with my speed........
-- Mr. S. H. Malave MTech, Computer Science & Engineering Dept., Walchand College of Engineering, Sangli. Mob. 9860470739 sachinmalave_at_wce.org.inReceived on Tue Sep 15 2009 - 05:34:35 MDT
This archive was generated by hypermail 2.2.0 : Tue Sep 15 2009 - 12:00:04 MDT