MDEV-28137 Some memory transactions are unnecessarily complex
buf_page_get_zip(): Do not perform a system call inside a memory transaction. Instead, if the page latch is unavailable, abort the memory transaction and let the fall-back code path wait for the page latch. buf_pool_t::watch_remove(): Return the previous state of the block. buf_page_init_for_read(): Use regular stores for moving the buffer fix count of watch_remove() to the new block descriptor. A more extensive version of this was reviewed by Daniel Black and tested with Intel TSX-NI by Axel Schwenke and Matthias Leich. My assumption that regular loads and stores would execute faster in a memory transaction than operations like std::atomic::fetch_add() turned out to be incorrect.
Showing
Please register or sign in to comment