Commit 5b26a076 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-34178: Enable spinloop for index_lock

In an I/O bound concurrent INSERT test conducted by Mark Callaghan,
spin loops on dict_index_t::lock turn out to be beneficial.

This is a mixed bag; enabling the spin loops will improve throughput
and latency on some workloads and degrade in others.

Reviewed by: Debarun Banerjee
Tested by: Matthias Leich
Performance tested by: Axel Schwenke
parent f8d213bd
......@@ -402,7 +402,7 @@ typedef srw_spin_lock_low srw_spin_lock;
class ssux_lock
{
PSI_rwlock *pfs_psi;
ssux_lock_impl<false> lock;
ssux_lock_impl<true> lock;
ATTRIBUTE_NOINLINE void psi_rd_lock(const char *file, unsigned line);
ATTRIBUTE_NOINLINE void psi_wr_lock(const char *file, unsigned line);
......
......@@ -285,7 +285,7 @@ class sux_lock final
typedef sux_lock<ssux_lock_impl<true>> block_lock;
#ifndef UNIV_PFS_RWLOCK
typedef sux_lock<ssux_lock_impl<false>> index_lock;
typedef sux_lock<ssux_lock_impl<true>> index_lock;
#else
typedef sux_lock<ssux_lock> index_lock;
......
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