Re:Investigating Split Locks on x86-64
by trebligdivad on Saturday April 11, 2026 @08:10AM
(#47729889)
I suspect it's the risk of deadlocks and perhaps they have no easy way to avoid it.
ordering lock acquisition is a tested strategy to avoid deadlocks; so locking the cache lines sorted by PA would cover that?
I assume to save on resources, even if your algorithm is not much more taxxing on silicon, maybe the designers at intel and amd just didn't think optimizing split locks was worth it
Re:Investigating Split Locks on x86-64
by gpderetta on Wednesday April 15, 2026 @08:01AM
(#47777906)
There is really no such a thing as cacheline locking per-se. As far as I understand, the coherence protocol guarantees that the cpu can hold a cacheline in the exclusive state for a certain set amount of cycles, which is enough to write the top element of the store buffer into it. Making sure that the two cachelines are available at the same time would add either significant complexity to the coherence protocol, which is already one of the most complex bits of the system and very hard to validate, or force a potentially unbounded retry/backoff loop with no guaranteed forward progress.
Perhaps the issue it that each core has a locked cacheline entry for each other core, but even then given the size of current CPUs doubling it shouldn't be that significant. And one could also add just a single extra entry and then have a global lock but that only locks the ability to lock a second cacheline.