• Sergey Vojtovich's avatar
    MDEV-11296 - InnoDB stalls under OLTP RW on P8 · fb7caad7
    Sergey Vojtovich authored
    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.
    fb7caad7
sync0rw.ic 26.1 KB