Commit 1ad1d789 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-26779: Enable adaptive spinning on ARMv8 for lock_sys.wait_mutex

Similar to commit f7684f0c (MDEV-26855)
we will try to enable the adaptive spinloop for lock_sys.wait_mutex
on ARMv8.

Enabling any form of spinloop for lock_sys.wait_mutex did not show a
significant improvement in our tests on AMD64.

Spinning can be argued to be a hack to reduce the impact on mutex
contention. It would be better to adjust the code to reduce
contention in the first place.
parent 83dbf2c9
......@@ -391,7 +391,11 @@ void lock_sys_t::create(ulint n_cells)
m_initialised= true;
latch.SRW_LOCK_INIT(lock_latch_key);
#ifdef __aarch64__
mysql_mutex_init(lock_wait_mutex_key, &wait_mutex, MY_MUTEX_INIT_FAST);
#else
mysql_mutex_init(lock_wait_mutex_key, &wait_mutex, nullptr);
#endif
#ifdef SUX_LOCK_GENERIC
pthread_mutex_init(&hash_mutex, nullptr);
pthread_cond_init(&hash_cond, nullptr);
......
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