3 ms·
Weakening the consistency of operations on the slow path is not going to be a speed-up. Those paths are not dominated by pipeline effects inside the CPU. They a
by pizlonator 11y ago
Weakening the consistency of operations on the slow path is not going to be a speed-up. Those paths are not dominated by pipeline effects inside the CPU. They are dominated by context switches and memory contention. So, SC is exactly right: it's harder to get wrong and exactly the same speed.
It's true that WTF::Lock doesn't support priority inheritance. That's fine for WebKit's threads.
- phabouzit 11y agoI disagree strongly as too strong barriers on non TSO hardware (such as say, armv7 or armv8) will just cause even more of that memory contention for no good reasons. Also on a contended lock, there's a very strong possibility that you will decide that the lock can be taken right before you block. On intel of course, it doesn't matter.
- pizlonator 10y agoIt also doesn't matter on all other architectures. The slow path is dominated by OS operations like yielding, which already execute the strongest barriers possible.