7 ms·
With a traditional spin lock and critical section, only one core can actually be executing code in the critical section at a time, and ownership of the cache li
by cwzwarich 13y ago
With a traditional spin lock and critical section, only one core can actually be executing code in the critical section at a time, and ownership of the cache line containing the lock bounces around between cores.
With lock elision, two cores can both optimistically execute code within the critical section and only abort when a dynamic data race (or some other abort condition, like running out of space in a hardware buffer) occurs. In that case, one core may take the lock and force the other to wait, just like the traditional lock.