The best approach to dealing with "locking overhead" is to stop thinking that
if locks are good, more locking (finer grained locking) is better. OS
designers (and Linux designers in particular) are still putting in way too much
locking. I deal with this in my day job (we support systems with
I've been watching Linux kernel development for a long time and they add locks
only when benchmarks show that a lock is causing a bottleneck. They don't just
add them because they can.
They do also spend a lot of time working to avoid locks.
One thing that you are missing is that you are think
I do know that. I would say that benchmarks rarely match real world problems of
real systems- they come from sources like academia and technical marketing
depts. My job for the last few years has been looking at stems with dozens of
processors across 2 and 4 sockets and multiple 10 GigE adapters