diff options
author | Jan Lindström <jplindst@mariadb.org> | 2014-10-24 17:56:04 +0300 |
---|---|---|
committer | Jan Lindström <jplindst@mariadb.org> | 2014-10-24 17:56:04 +0300 |
commit | 7e71dfa9f5e2ee9c44cdbc265b23a741a51b3f95 (patch) | |
tree | 4dd5cab488f1adbc7118c9f5611df208abdaeb64 /storage/xtradb/buf/buf0lru.cc | |
parent | f0debf2feb2665e98e6c668cf15e334b469b6677 (diff) | |
download | mariadb-git-7e71dfa9f5e2ee9c44cdbc265b23a741a51b3f95.tar.gz |
MDEV-6933: Spurious lock_wait_timeout_thread wakeup in lock_wait_suspend_thread()
Merged Facebooks commit 6e06bbfa315ffb97d713dd6e672d6054036ddc21
authored by Inaam Rana from https://github.com/facebook/mysql-5.6.
Fixes MySQL bug http://bugs.mysql.com/bug.php?id=72123
lock_timeout thread works in a tight loop waking up every second
and checking for lock_wait_timeout. In addition, when a mysql
thread is forced to wait on a lock, it signals the lock_timeout thread
as well. This call is not required. In a heavily contended workload
each thread going to wait will signal the lock_timeout thread making
it work all the time. As lock_timeout thread scans the array of
waiting threads under lock_sys::wait_mutex which is already very
hot in contneded loads, these extra scans can cause significanct
performance regression.
Also, in various codepaths lock_timeout thread is signalled where
actual intention was to signal the innodb monitor thread.
Diffstat (limited to 'storage/xtradb/buf/buf0lru.cc')
-rw-r--r-- | storage/xtradb/buf/buf0lru.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/xtradb/buf/buf0lru.cc b/storage/xtradb/buf/buf0lru.cc index 3b0319e4e79..e9b6d8f3fb5 100644 --- a/storage/xtradb/buf/buf0lru.cc +++ b/storage/xtradb/buf/buf0lru.cc @@ -1282,7 +1282,7 @@ buf_LRU_check_size_of_non_data_objects( buf_lru_switched_on_innodb_mon = TRUE; srv_print_innodb_monitor = TRUE; - os_event_set(lock_sys->timeout_event); + os_event_set(srv_monitor_event); } } else if (buf_lru_switched_on_innodb_mon) { @@ -1497,7 +1497,7 @@ loop: mon_value_was = srv_print_innodb_monitor; started_monitor = TRUE; srv_print_innodb_monitor = TRUE; - os_event_set(lock_sys->timeout_event); + os_event_set(srv_monitor_event); } /* If we have scanned the whole LRU and still are unable to |