MDEV-34178: Improve the spin loops
srw_mutex_impl<spinloop>::wait_and_lock(): Invoke srw_pause() and reload the lock word on each loop. Thanks to Mark Callaghan for suggesting this. ssux_lock_impl<spinloop>::rd_wait(): Actually implement a spin loop on the rw-lock component without blocking on the mutex component. If there is a conflict with wr_lock(), wait for writer.lock to be released without actually acquiring it. Reviewed by: Debarun Banerjee Tested by: Matthias Leich
Showing
Please register or sign in to comment