Commit 9118fd36 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-24142 - Windows - do not use WaitOnAddress-based ssux_lock.

WaitOnAddress() turns out to be too CPU-heavy for the specific scenario,
which makes it prominent in profiler output on several benchmarks with
contended sux_lock.

The condition variable implementation does not show the same behavior.
Thus, defined SRWLOCK_DUMMY for Windows

srw_mutex should remain mapped to SRWLOCK on Windows (since SRWLOCK is
smaller).
parent f02c8ffa
......@@ -237,6 +237,7 @@ SET(INNOBASE_SOURCES
include/srv0mon.ic
include/srv0srv.h
include/srv0start.h
include/srw_lock.h
include/sux_lock.h
include/trx0i_s.h
include/trx0purge.h
......
......@@ -19,13 +19,13 @@ this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
#include "univ.i"
#if !(defined __linux__ || defined _WIN32 || defined __OpenBSD__)
#if !(defined __linux__ || defined __OpenBSD__)
# define SRW_LOCK_DUMMY
#elif 0 // defined SAFE_MUTEX
# define SRW_LOCK_DUMMY /* Use dummy implementation for debugging purposes */
#endif
#ifdef SRW_LOCK_DUMMY
#if defined SRW_LOCK_DUMMY && !(defined _WIN32)
/** An exclusive-only variant of srw_lock */
class srw_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