mariadb/mysys
Vladislav Vaintroub 367bfa4106 A follow-up to the patch for bug #56405 "Deadlock in the MDL deadlock
detector". This patch addresses performance regression in OLTP_RO/MyISAM
test on Windows introduced by the fix for bug #56405. Thus it makes
original patch acceptable as a solution for bug #56585 "Slowdown of
readonly sysbench benchmarks (e.g point_select) on Windows 5.5".

With this patch, MySQL will use native Windows condition variables and 
reader-writer locks  if  they are supported by the OS.

This speeds up MyISAM and the effect comes mostly from using native
rwlocks. Native conditions improve scalability with higher number of 
concurrent users in other situations, e.g for prlocks.

Benchmark numbers for this patch as measured on Win2008R2 quad
core machine are attached to the bug report.
( direct link http://bugs.mysql.com/file.php?id=15883 )

Note that currently we require at least Windows7/WS2008R2 for 
reader-writer locks, even though native rwlock is available also on Vista.
Reason is that "trylock" APIs are missing on Vista, and trylock is used in
the server (in a single place in query cache).

While this patch could have been written differently, to enable the native
rwlock optimization also on Vista/WS2008 (e.g using native locks everywhere
but portable implementation in query cache), this would come at the 
expense of the code clarity, as it would introduce a new  "try-able" rwlock
type, to handle Vista case.

Another way to improve performance for the special case 
(OLTP_RO/MYISAM/Vista) would be to eliminate "trylock" usage from server,
 but this is outside of the scope here.


Native conditions variables are used beginning with Vista though the effect
of using condition variables alone is not measurable in this benchmark.
But when used together with native rwlocks on Win7, native conditions improve 
performance in high-concurrency OLTP_RO/MyISAM (128 and more sysbench 
users).
2010-10-04 13:03:11 +02:00
..
array.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
base64.c
ChangeLog
charset-def.c Backporting WL#1213 2010-02-24 13:15:34 +04:00
charset.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
checksum.c WL#5498: Remove dead and unused source code 2010-07-23 17:09:27 -03:00
CMakeLists.txt Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect). 2010-08-12 19:19:57 +04:00
default.c WL#5498: Remove dead and unused source code 2010-07-23 17:17:55 -03:00
errors.c Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-20 16:30:10 -03:00
hash.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
lf_alloc-pin.c WL#5498: Remove dead and unused source code 2010-07-23 17:13:36 -03:00
lf_dynarray.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
lf_hash.c WL#5498: Remove dead and unused source code 2010-07-23 17:13:36 -03:00
list.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
Makefile.am WL#5498: Remove dead and unused source code 2010-07-23 17:14:35 -03:00
md5.c
mf_arr_appstr.c
mf_brkhant.c
mf_cache.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
mf_dirname.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:26:38 -03:00
mf_fn_ext.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:26:38 -03:00
mf_format.c
mf_getdate.c
mf_iocache.c Auto-merge from mysql-trunk-merge. 2010-07-29 16:32:11 +04:00
mf_iocache2.c WL#5498: Remove dead and unused source code 2010-07-23 17:16:29 -03:00
mf_keycache.c WL#5498: Remove dead and unused source code 2010-07-23 17:15:41 -03:00
mf_keycaches.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
mf_loadpath.c Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-02 16:38:04 -03:00
mf_pack.c Merge of mysql-trunk-bugfixing into mysql-trunk-merge. 2010-07-15 10:47:50 -03:00
mf_path.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:13:30 -03:00
mf_qsort.c
mf_qsort2.c
mf_radix.c
mf_same.c
mf_sort.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
mf_soundex.c
mf_tempdir.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:13:30 -03:00
mf_tempfile.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:17:56 -03:00
mf_unixpath.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:16:06 -03:00
mf_wcomp.c
mulalloc.c
my_access.c
my_aes.c
my_alarm.c
my_alloc.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_atomic.c WL#5498: Remove dead and unused source code 2010-07-23 17:18:36 -03:00
my_bit.c WL#5498: Remove dead and unused source code 2010-07-23 17:18:36 -03:00
my_bitmap.c WL#5498: Remove dead and unused source code 2010-07-23 17:09:27 -03:00
my_chsize.c
my_compress.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_conio.c
my_copy.c Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-20 16:30:10 -03:00
my_crc32.c
my_create.c
my_delete.c Backport of revid:ingo.struewing@sun.com-20091223200354-r2uzbdkj2v6yv111 2010-06-25 19:32:59 +04:00
my_div.c
my_error.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_file.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_fopen.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_fstream.c
my_gethostbyname.c
my_gethwaddr.c Fix a compiler warning in my_gethwaddr.c:67: 2010-09-09 15:51:50 +03:00
my_getncpus.c
my_getopt.c Auto-merge from mysql-5.5-merge. 2010-09-28 19:15:58 +04:00
my_getpagesize.c
my_getsystime.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:13:30 -03:00
my_getwd.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:26:38 -03:00
my_handler.c WL#5498: Remove dead and unused source code 2010-07-23 17:16:29 -03:00
my_handler_errors.h
my_init.c Merging with mysql-5.5-stage. 2010-08-16 14:50:27 +02:00
my_largepage.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_lib.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:26:38 -03:00
my_libwrap.c
my_lock.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:26:38 -03:00
my_lockmem.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_malloc.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_memmem.c
my_mess.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:13:30 -03:00
my_mkdir.c
my_mmap.c Backport of revid:ingo.struewing@sun.com-20091223200354-r2uzbdkj2v6yv111 2010-06-25 19:32:59 +04:00
my_new.cc
my_once.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_open.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_port.c
my_pread.c
my_pthread.c WL#5498: Remove dead and unused source code 2010-07-23 17:17:55 -03:00
my_quick.c
my_rdtsc.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:13:30 -03:00
my_read.c
my_redel.c Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-20 16:30:10 -03:00
my_rename.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:13:30 -03:00
my_seek.c
my_sleep.c WL#5486: Remove code for unsupported platforms 2010-07-15 08:13:30 -03:00
my_static.c WL#5498: Remove dead and unused source code 2010-07-23 17:14:35 -03:00
my_static.h WL#5498: Remove dead and unused source code 2010-07-23 17:14:35 -03:00
my_symlink.c
my_symlink2.c
my_sync.c fix typo in previous patch 2010-09-09 15:55:37 +02:00
my_thr_init.c Bug #55345, "mysql_library_init causes segfault if executed after calling mysql_library_end" 2010-08-22 20:41:42 -05:00
my_timer_cycles.il
my_wincond.c A follow-up to the patch for bug #56405 "Deadlock in the MDL deadlock 2010-10-04 13:03:11 +02:00
my_windac.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_winerr.c
my_winfile.c
my_winthread.c A follow-up to the patch for bug #56405 "Deadlock in the MDL deadlock 2010-10-04 13:03:11 +02:00
my_write.c
mysys_priv.h merge 2010-01-11 17:46:16 +01:00
ptr_cmp.c
queues.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
rijndael.c WL#5498: Remove dead and unused source code 2010-07-23 17:09:27 -03:00
sha1.c
stacktrace.c Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile 2010-08-03 11:49:14 +08:00
string.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
test_charset.c WL#5498: Remove dead and unused source code 2010-07-23 17:09:27 -03:00
test_dir.c
test_xml.c
testhash.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
thr_alarm.c WL#5498: Remove dead and unused source code 2010-07-23 17:09:27 -03:00
thr_lock.c Auto-merge from mysql-5.5-merge. 2010-08-30 18:07:40 +04:00
thr_mutex.c
thr_rwlock.c A follow-up to the patch for bug #56405 "Deadlock in the MDL deadlock 2010-10-04 13:03:11 +02:00
tree.c Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
typelib.c Fix C++ style comments, they cause syntax errors in C file. 2010-03-13 22:17:47 +01:00