mariadb/include
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
..
atomic Bug#52419: x86 assembly based atomic CAS causes test failures 2010-09-17 17:34:15 -03:00
mysql A better fix for bug #56405 "Deadlock in the MDL deadlock 2010-09-29 16:09:07 +04:00
base64.h Merge mysql.com:/home/kent/bk/main/mysql-5.0 2006-12-23 20:20:40 +01:00
CMakeLists.txt Cherry-picking patch for Bug#55846. 2010-08-31 18:33:19 +04:00
decimal.h WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
errmsg.h Merge from mysql-next-mr. 2009-10-28 10:55:44 +03:00
ft_global.h WL#4738 streamline/simplify @@variable creation process 2009-12-22 10:35:56 +01:00
hash.h Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
heap.h WL#5419 "LOCK_open scalability: make tdc_refresh_version 2010-06-11 19:28:18 +04:00
keycache.h WL#5030: Split and remove mysql_priv.h 2010-03-31 16:05:33 +02:00
lf.h WL#5498: Remove dead and unused source code 2010-07-23 17:13:36 -03:00
m_ctype.h Cherry-picking patch for Bug#55980. 2010-08-31 18:22:03 +04:00
m_string.h WL#5498: Remove dead and unused source code 2010-07-23 17:17:55 -03:00
Makefile.am Automerge (most) changes of the 5.5.6-rc release build to main 5.5. 2010-09-10 20:48:13 +02:00
my_aes.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
my_alarm.h Manual merge from 5.1. 2010-07-01 12:06:41 +04:00
my_alloc.h Post-merge fix: header is used by the client API. Obvious in retrospect. 2010-06-05 16:39:03 -03:00
my_atomic.h WL#5498: Remove dead and unused source code 2010-07-23 17:18:36 -03:00
my_attribute.h WL#5498: Remove dead and unused source code 2010-07-23 17:16:29 -03:00
my_base.h Bug#53445: Build with -Wall and fix warnings that it generates 2010-05-31 12:29:54 -03:00
my_bit.h WL#5498: Remove dead and unused source code 2010-07-23 17:18:36 -03:00
my_bitmap.h WL#5498: Remove dead and unused source code 2010-07-23 17:09:27 -03:00
my_compiler.h Bug#42733: Type-punning warnings when compiling MySQL -- 2010-07-14 16:39:40 -03:00
my_dbug.h WL#5486: Remove code for unsupported platforms 2010-07-15 08:16:06 -03:00
my_dir.h WL#5030: Splitting mysql_priv.h 2010-04-06 14:11:07 +02:00
my_getopt.h Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-10 22:30:49 -03:00
my_global.h WL#5498: Remove dead and unused source code 2010-07-23 17:18:36 -03:00
my_handler.h WL#5030: Split and remove mysql_priv.h 2010-03-31 16:05:33 +02:00
my_libwrap.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
my_list.h Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled 2010-07-08 18:20:08 -03:00
my_md5.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
my_net.h WL#5498: Remove dead and unused source code 2010-07-23 17:14:35 -03:00
my_no_pthread.h Manual merge from mysql-trunk-merge. 2009-12-16 21:02:21 +03:00
my_nosys.h WL#5498: Remove dead and unused source code 2010-07-23 17:15:07 -03:00
my_pthread.h A follow-up to the patch for bug #56405 "Deadlock in the MDL deadlock 2010-10-04 13:03:11 +02:00
my_rdtsc.h WL#2373 Use cycle counter for timing 2009-11-24 16:36:31 -07:00
my_stacktrace.h WL#5486: Remove code for unsupported platforms 2010-07-15 08:13:30 -03:00
my_sys.h WL#5498: Remove dead and unused source code 2010-07-23 17:15:07 -03:00
my_time.h WL#5486: Remove code for unsupported platforms 2010-07-15 08:28:41 -03:00
my_tree.h WL#5030: Split and remove mysql_priv.h 2010-03-31 16:05:33 +02:00
my_uctype.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
my_user.h WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
my_xml.h WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
myisam.h merge 2010-08-05 15:34:19 +03:00
myisammrg.h WL#2360 Performance schema 2009-12-04 18:26:15 -07:00
myisampack.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
mysql.h Auto-merge from mysql-5.1-bugteam. 2010-09-07 14:49:47 +07:00
mysql.h.pp Auto-merge from mysql-5.1-bugteam. 2010-09-07 14:49:47 +07:00
mysql_com.h Auto-merge from mysql-trunk. 2010-05-28 09:47:58 +04:00
mysql_embed.h WL#5498: Remove dead and unused source code 2010-07-23 17:15:07 -03:00
mysql_time.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mysql_version.h.in Bug #15327: configure: --with-tcp-port option being partially ignored 2007-09-13 16:19:46 +02:00
mysys_err.h Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-07-20 16:30:10 -03:00
password.h WL#5030: Split and remove mysql_priv.h 2010-03-31 16:05:33 +02:00
probes_mysql.d.base Fixing some issues in the build when using DTrace probes 2009-03-18 10:04:15 +00:00
probes_mysql.h Backport of DTrace patches from 6.0 2008-12-20 11:01:41 +01:00
probes_mysql_nodtrace.h Re-adding 'include/probes_mysql_nodtrace.h' removed by accident 2010-02-17 14:37:55 +03:00
queues.h WL#5030: Split and remove mysql_priv.h 2010-03-31 16:05:33 +02:00
rijndael.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
service_versions.h WL#5363: Thread Pool Service Interface 2010-06-07 16:01:39 +02:00
sha1.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sha2.h Post-fix for Bug#13174. 2010-04-13 20:10:51 +04:00
sql_common.h WL#5016: Fix header file include guards 2009-09-23 23:32:31 +02:00
sslopt-case.h Backport of: 2010-04-13 19:04:45 +04:00
sslopt-longopts.h Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-10 22:30:49 -03:00
sslopt-vars.h Backport of: 2010-04-13 19:04:45 +04:00
t_ctype.h Many files: 2006-12-23 20:17:15 +01:00
thr_alarm.h WL#5161 : Cross-platform build with CMake 2009-11-09 12:32:48 +01:00
thr_lock.h Merging with mysql-5.5-stage. 2010-08-16 14:50:27 +02:00
typelib.h Backport changeset from mysql-next-mr-bugfixing: 2010-07-05 18:20:46 +02:00
violite.h WL#5363: Thread Pool Service Interface 2010-06-07 16:01:39 +02:00