On Thu Aug 31 12:25:16 2023 +0000, Yuxuan Shui wrote:
oh my, native SRWLOCK is really really fast. Even when compared to the current, no wait list version. I noticed with exclusive locks, current SRWLOCK would show >100% CPU usage. I think this means there are some spinning going on?
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.