mariadb/include
Marko Mäkelä 042fc29597 MDEV-19845: Adaptive spin loops
Starting with the Intel Skylake microarchitecture, the PAUSE
instruction latency is about 140 clock cycles instead of earlier 10.
On AMD processors, the latency could be 10 or 50 clock cycles,
depending on microarchitecture.

Because of this big range of latency, let us scale the loops around
the PAUSE instruction based on timing results at server startup.

my_cpu_relax_multiplier: New variable: How many times to invoke PAUSE
in a loop. Only defined for IA-32 and AMD64.

my_cpu_init(): Determine with RDTSC the time to run 16 PAUSE instructions
in two unrolled loops according, and based on the quicker of the two
runs, initialize my_cpu_relax_multiplier. This form of calibration was
suggested by Mikhail Sinyavin from Intel.

LF_BACKOFF(), ut_delay(): Use my_cpu_relax_multiplier when available.

ut_delay(): Define inline in my_cpu.h.

UT_COMPILER_BARRIER(): Remove. This does not seem to have any effect,
because in our ut_delay() implementation, no computations are being
performed inside the loop. The purpose of UT_COMPILER_BARRIER() was to
prohibit the compiler from reordering computations. It was not
emitting any code.
2019-06-27 10:53:18 +03:00
..
atomic Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
mysql Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
big_endian.h Update FSF address 2019-05-11 19:25:02 +03:00
byte_order_generic.h Update FSF address 2019-05-11 19:25:02 +03:00
byte_order_generic_x86.h Update FSF address 2019-05-11 19:25:02 +03:00
byte_order_generic_x86_64.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
CMakeLists.txt Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
decimal.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
dur_prop.h Merge InnoDB 5.7 from mysql-5.7.9. 2016-09-02 13:22:28 +03:00
errmsg.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
ft_global.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
handler_ername.h Follow-up to changing FSF address 2019-05-11 18:30:45 +03:00
handler_state.h
hash.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
heap.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
json_lib.h Merge branch '10.2' into 10.3 2018-09-28 16:37:06 +02:00
keycache.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
lf.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
little_endian.h Update FSF address 2019-05-11 19:25:02 +03:00
m_ctype.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
m_string.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
ma_dyncol.h MDEV-7533: COLUMN_JSON() doesn't escape control characters in string values 2018-01-23 13:06:39 +01:00
maria.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_alarm.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
my_alloc.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_atomic.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_attribute.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_base.h Merge branch '10.2' into 10.3 2019-06-14 07:36:47 +02:00
my_bit.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_bitmap.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_byteorder.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
my_check_opt.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
my_compare.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_compiler.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_context.h Merge branch '10.1' into 10.2 2016-03-23 22:36:46 +01:00
my_cpu.h MDEV-19845: Adaptive spin loops 2019-06-27 10:53:18 +03:00
my_crypt.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
my_dbug.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_decimal_limits.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
my_default.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
my_dir.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_getopt.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_global.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_handler_errors.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_libwrap.h Update FSF Address 2019-05-11 21:29:06 +03:00
my_list.h Update FSF Address 2019-05-11 21:29:06 +03:00
my_md5.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
my_net.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_nosys.h Update FSF Address 2019-05-11 21:29:06 +03:00
my_pthread.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_rdtsc.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
my_rnd.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
my_service_manager.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
my_stacktrace.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_sys.h Merge 10.2 into 10.3 2019-06-19 08:56:10 +03:00
my_time.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_tree.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_uctype.h Update FSF Address 2019-05-11 21:29:06 +03:00
my_user.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
my_valgrind.h Merge 10.2 into 10.3 2019-05-29 11:32:46 +03:00
my_xml.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
myisam.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
myisamchk.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
myisammrg.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
myisampack.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
mysql.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
mysql.h.pp Merge 10.2 into 10.3 2019-02-19 17:41:13 +02:00
mysql_async.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
mysql_com.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
mysql_com_server.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
mysql_embed.h Update FSF Address 2019-05-11 21:29:06 +03:00
mysql_time.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
mysql_version.h.in MDEV-12501 -- set --maturity-level by default 2017-12-09 23:34:43 +00:00
mysqld_default_groups.h MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes) 2014-10-11 18:53:06 +02:00
mysys_err.h Update FSF Address 2019-05-11 21:29:06 +03:00
pack.h Merge branch '10.2' into bb-10.2-connector-c-integ-subm 2016-09-21 12:54:56 +02:00
password.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
probes_mysql.d.base Update FSF Address 2019-05-11 21:29:06 +03:00
probes_mysql.h Update FSF Address 2019-05-11 21:29:06 +03:00
probes_mysql_nodtrace.h.in Merge branch '5.5' into 10.0 2016-02-15 22:50:59 +01:00
queues.h Misc. typos 2018-04-05 15:26:57 +04:00
rijndael.h Update FSF Address 2019-05-11 21:29:06 +03:00
service_versions.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
source_revision.h.in SOURCE_REVISION should always be defined in source_revision.h 2017-11-01 13:20:32 +00:00
sql_common.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
ssl_compat.h Windows : fix broken build with OpenSSL 2018-09-08 20:36:31 +01:00
sslopt-case.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
sslopt-longopts.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
sslopt-vars.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
t_ctype.h Update FSF Address 2019-05-11 21:29:06 +03:00
thr_alarm.h Update FSF Address 2019-05-11 21:29:06 +03:00
thr_lock.h Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
thr_timer.h Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
thread_pool_priv.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
typelib.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
violite.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
waiting_threads.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
welcome_copyright_notice.h Update FSF Address 2019-05-11 21:29:06 +03:00
wqueue.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
wsrep.h Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00