Re: Squid-smp : Please discuss

From: Robert Collins <robertc_at_robertcollins.net>
Date: Tue, 15 Sep 2009 13:28:43 +1000

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 - 03:28:49 MDT

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