Details
- 
    Task 
- 
    Status: Closed (View Workflow)
- 
    Critical 
- 
    Resolution: Fixed
- 
        10.3.6-1, 10.4.0-1
Description
MySQL 8.0.0 split the InnoDB buf_pool_t::mutex. MariaDB should do something similar.
Instead of introducing more mutexes or radically changing the latching rules of various buf_pool_t and buf_block_t data members, I think that it is possible to reduce the contention on buf_pool.mutex by other means:
- Move more code to inline functions of buf_pool_t or buf_page_t.
- Reduce the amount of mutex release/reacquire dance in buf0flu.cc and buf0rea.cc.
- Avoid repeated calls to page_id_t::fold() or page_id_t::page_id_t(); use page_id_t directly as loop iterator.
- Move buf_page_t::flush_type to IORequest.
- Split buf_page_io_complete() into separate ‘read completion’ and ‘write completion’ callbacks.
- Avoid holding buf_pool.mutex during buf_pool.page_hash operations. Consider removing the debug field buf_page_t::in_page_hash.
- Split operations on buf_pool.watch[] into two parts. The allocation of buf_pool.watch[] should be only protected by buf_pool.mutex, and the buf_pool.page_hash only by the hash bucket latch.
Attachments
Issue Links
- blocks
- 
                    MDEV-16526 Overhaul the InnoDB page flushing -         
- Closed
 
-         
- causes
- 
                    MDEV-22816 Assertion `node->space == fil_system.sys_space' failed in fil_aio_callback -         
- Closed
 
-         
- 
                    MDEV-23017 range query performance regression in 10.5.4 -         
- Closed
 
-         
- 
                    MDEV-23229 Read of Uninitialized memory during buffer pool resizing -         
- Closed
 
-         
- 
                    MDEV-23399 10.5 performance regression with IO-bound tpcc -         
- Closed
 
-         
- 
                    MDEV-23410 buf_LRU_scan_and_free_block() fails to stop at first freed block -         
- Closed
 
-         
- 
                    MDEV-23807 Assertion n_pending_flushes failed in fil_node_t::prepare_to_close_or_detach() -         
- Closed
 
-         
- 
                    MDEV-23909 innodb_flush_neighbors=2 is treated like innodb_flush_neighbors=0 -         
- Closed
 
-         
- 
                    MDEV-24054 Assertion `in_LRU_list' failed in buf_page_t::ready_for_flush -         
- Closed
 
-         
- 
                    MDEV-25776 Assertion `bpage->in_page_hash' in buf_pool_t::page_hash_get_low -         
- Closed
 
-         
- 
                    MDEV-29967 innodb_read_ahead_threshold (linear read-ahead) does not work -         
- Closed
 
-         
- 
                    MDEV-33332 SIGSEGV in buf_read_ahead_linear() when bpage is in buf_pool.watch -         
- Closed
 
-         
- 
                    MDEV-33591 MONITOR_INC_VALUE_CUMULATIVE is executed regardless of "if" condition -         
- Closed
 
-         
- 
                    MDEV-37902 Threadpool - debug assertion thread_group->active_thread_count >=0, from TP_connection_generic::wait_begin -         
- Closed
 
-         
- is duplicated by
- 
                    MDEV-18724 Replace buf_block_t::mutex with more std::atomic -         
- Closed
 
-         
- relates to
- 
                    MDEV-15384 buf_flush_LRU_list_batch() always reports n->flushed=0, n->evicted=0 -         
- Closed
 
-         
- 
                    MDEV-22850 Reduce buf_pool.page_hash latch contention -         
- Closed
 
-         
- 
                    MDEV-22862 compilation failure on centos74-aarch64 -         
- Closed
 
-         
- 
                    MDEV-22871 Contention on the buf_pool.page_hash -         
- Closed
 
-         
- 
                    MDEV-23416 innodb.innodb_mutexes failed in buildbot with extra warning -         
- Closed
 
-         
- 
                    MDEV-23439 Assertion `size == space->size' failed in buf_read_ahead_random -         
- Closed
 
-         
- 
                    MDEV-24090 Optimize buf_page_optimistic_get() -         
- Open
 
-         
- 
                    MDEV-15016 multiple page cleaner threads use a lot of CPU on idle server -         
- Closed
 
-         
- 
                    MDEV-15058 Remove multiple InnoDB buffer pool instances -         
- Closed
 
-         
- 
                    MDEV-21330 Lock monitor doesn't print a semaphore's last reserved thread in non-debug builds and INFORMATION_SCHEMA.INNODB_SYS_SEMAPHORE_WAITS is totally broken -         
- Closed
 
-         
- 
                    MDEV-22031 Assertion `bpage->in_page_hash' failed in buf_pool_watch_set upon normal upgrade from 10.1 -         
- Closed
 
-         
- 
                    MDEV-25001 [buf0buf.cc] untimely crash v 10.4.14 -         
- Closed
 
-