logoalt Hacker News

Investigating Split Locks on x86-64

43 pointsby ingvelast Wednesday at 6:06 AM9 commentsview on HN

Comments

anematodetoday at 2:30 AM

Cool investigation. This part perplexes me, though:

> Games have apparently been using split locks for quite a while, and have not created issues even on AMD’s Zen 2 and Zen 5.

For the life of me I don't understand why you'd ever want to do an atomic operation that's not naturally aligned, let alone one split across cache lines....

show 1 reply
strstrtoday at 5:17 AM

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.