On Thu Aug 31 12:26:04 2023 +0000, Yuxuan Shui wrote:
I see, in current version all threads Waits on the same Address, so the address' futex queue is contended. Threads are spinning on `queue->lock`, so there is a chance for the lock to be released and the threads never actually call `futex` (in this synthetic test anyway). Whereas with this MR threads are generally waiting on different addresses, so they always enter futex.
Another observation is current SRWLOCK is pretty unfair (again, in this one test).