Commit 0772ac1f authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-33508 Performance regression due to frequent scan of full buf_pool.flush_list

buf_flush_page_cleaner(): Remove a loop that had originally been added
in commit 9d146652 (MDEV-32029) and made
redundant by commit 5b53342a (MDEV-32588).

Starting with commit d34479dc (MDEV-33053)
this loop would cause a significant performance regression in workloads
where buf_pool.need_LRU_eviction() constantly holds in
buf_flush_page_cleaner().

Thanks to Steve Shaw of Intel for noticing this.

Reviewed by: Debarun Banerjee
Tested by: Matthias Leich
parent f1c615ec
......@@ -2433,16 +2433,6 @@ static void buf_flush_page_cleaner()
{
buf_pool.page_cleaner_set_idle(false);
buf_pool.n_flush_inc();
/* Remove clean blocks from buf_pool.flush_list before the LRU scan. */
for (buf_page_t *p= UT_LIST_GET_FIRST(buf_pool.flush_list); p; )
{
const lsn_t lsn{p->oldest_modification()};
ut_ad(lsn > 2 || lsn == 1);
buf_page_t *n= UT_LIST_GET_NEXT(list, p);
if (lsn <= 1)
buf_pool.delete_from_flush_list(p);
p= n;
}
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
n= srv_max_io_capacity;
mysql_mutex_lock(&buf_pool.mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment