tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Dynamically allocated locks




On Mar 25, 2008, at 1:04 PM, jonathan%dsg.stanford.edu@localhost wrote:
In message <FA2A84E8-8919-42A8-883C-A6658DCC3FE6%shagadelic.org@localhost>,
Jason Thorpe writes:


On Mar 24, 2008, at 10:10 AM, Matt Thomas wrote:

Yes.  One / cacheline size is a dramatic waste of space.  Some
systems have
128 bytes per cacheline.  On systems with small caches or UP systems
it's
extremely expensive.

Two independent locks in a single cache line is guaranteed to crease a
false-sharing situation.  It is best avoided, even if cache pressure
is the trade-off.

Even on a UP system?  In the kernel? Surely not.

Obviously on a UP system, it doesn't matter, and Andy already suggested that he would change the code to account for that.

-- thorpej



Home | Main Index | Thread Index | Old Index