Description:
Two InnoDB buffer pool LRU optimizations:
Narrows the scope of the buffer pool LRU_list_mutex in buf_page_init_for_read() so that it covers only the LRU list insert. The page hash lookup and insert, the descriptor initialization and the read io-fix are done under the page hash cell X-latch alone. As a result, a page being read can now briefly be in the page hash, io-fixed for read, before it is added to the LRU list; code that reaches pages through the page hash is adjusted for this. buf_pool_watch_set() no longer takes the LRU_list_mutex. A new latching rule, never wait for a block frame rw-lock while holding the LRU_list_mutex, is checked in debug builds.
Fixes the inverted old/young check in LRUItr::start() (one byte: m_hp->old -> !m_hp->old). The scan hazard pointer was rewound to the tail of the LRU list on every call while it was still in the old sublist, instead of only after it had moved into the young sublist.
How to repeat:
Patch will be attached as a file and can also be found at: https://github.com/mysql/mysql-server/pull/859
How to repeat tests:
- described at https://github.com/mysql/mysql-community/issues/155
- and in blog posts referenced there