Comment by strstr

11 hours ago

Split locks are weird. It’s never been obvious to me why you’d want to do them unless you are on a small core count system. When split lock detection rolled out for linux, it massacred perf for some games (which were probably min-maxing single core perf and didn’t care about noisy neighbor effects).

Frankly, I’m surprised split lock detection is enabled anywhere outside of multi-tenant clouds.

Split locks are never something anyone wants to do, unless they are morons.

Split locks are always bugs, but like many other bugs that are benign on Intel/AMD CPU-based computers (due to efforts done by the hardware designers to mitigate such bugs, instead of crashing applications), they are not uncommon in commercial software written by careless programmers.

The Intel/AMD CPUs contain a lot of additional hardware whose only purpose is to enable them to run programs written by less competent programmers, who also use less sophisticated programming tools, so they are not able to deal with more subtle things, like data alignment or memory barriers.

This additional hardware greatly reduces the performance impact of non-optimized programs, but it cannot eliminate it entirely.

  • To me it seems an artefact of the x86 architecture; where any sane architecture just declared split locks illegal, x86 has some gently hidden away note about it being a bad thing.

You don't want them. Except for bug-compatibility with old broken software which is something that Intel (and MS) care a lot about.

If you mean split-lock detection, it is because split locks are a massive DoS vulnerability on high core count CPUs.