MDEV-11296 - InnoDB stalls under OLTP RW on P8
Simplify away recursive flag: it is not necessary for rw-locks to operate properly. Now writer_thread != 0 means recursive. As we only need correct value of writer_thread only in writer_thread itself it is rather safe to load and update it non-atomically. This patch also fixes potential reorder of "writer_thread" and "recursive" loads (aka MDEV-7148), which was reopened along with InnoDB thread fences simplification. Previous versions are unaffected, because they have os_rmb in rw_lock_lock_word_decr(). It wasn't observed at the moment of writing though.
Showing
Please register or sign in to comment