[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Dynamically allocated locks
On Mar 23, 2008, at 10:52 AM, Andrew Doran wrote:
This patch allows for dynamically allocated locks.
Each lock gets its own cache line, which can reduce cache coherency
when the lock is very active. The locks are reference counted so
shared between objects. That could be used for the two ends of a
connection, or to share a lock between clone()d processes in order to
protect common state like signal actions, etc.
Yes. One / cacheline size is a dramatic waste of space. Some
128 bytes per cacheline. On systems with small caches or UP systems
Other than that its fine. I can see not crossing a cacheline boundary,
but only 1 / cacheline is just wrong.
Main Index |
Thread Index |