[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Dynamically allocated locks
Other than that its fine. I can see not crossing a cacheline
but only 1 / cacheline is just wrong.
It really does matter on MP systems. If you were to take a machine
all CPUs doing nothing but modifying operations on data within a
cache line, then in the best case the machine would in effect be
threaded: it would do no better than a single CPU system. In the
it could be a lot slower due to (for example) costly writebacks to
I understand that but in reality we are only talking about a handful of
lock per cacheline. if the system has a few looks, this would be bad.
but as we go to finer grained locked, the chances of this being a
drop dramatically. For high contention locks (like global lock), one
cache line makes sense. for low contention locks (like a socket lock),
multiple per cacheline makes sense.
maybe two pools, one for each type?
Main Index |
Thread Index |