Commit graph

26 commits

Author SHA1 Message Date
Vladislav Vaintroub
85a025f30c Threadpool - use EV_ONESHOT with kevent, to prevent race condition when 2
threads are retrieving events at the same time.
2012-04-12 01:40:44 +02:00
Vladislav Vaintroub
2a5d8ea9a2 Added copiright, some more comments 2012-02-17 23:27:15 +01:00
Vladislav Vaintroub
cfa56f900a address second round review comments 2012-02-16 16:59:04 +01:00
Vladislav Vaintroub
4d1c7b7947 some more whitespace, remove pending_thread_start_count. increment counters (thread_group->count, thread_group->active_thread_count) whenever mysql_create_thread returns success. 2012-01-28 01:09:28 +01:00
Vladislav Vaintroub
804f3bfeaf Threadpool : Rest of monty's review 2012-01-27 19:52:53 +01:00
Vladislav Vaintroub
57b6cb39aa Further review points and simplify Windows implementation 2012-01-26 04:35:54 +01:00
Vladislav Vaintroub
d50649ecf7 small cleanups 2012-01-24 03:23:14 +01:00
Vladislav Vaintroub
c492296127 ensure that lock is held, whenever active thread counter changes.
It was not the case inside listener routine.
2012-01-18 21:12:04 +01:00
Vladislav Vaintroub
6909311028 Threadpool : address some of the monty's review points
Also, print message when pool blocks.
2012-01-17 18:50:40 +01:00
Vladislav Vaintroub
1f8cbf168c Fix threadpool on BSD and Solaris 2012-01-16 02:18:24 +01:00
Vladislav Vaintroub
d212991e89 Get rid of idle thread counter atomic variable.
Instead, use function that loops over groups and 
calculates  idle threads for  "show status".
2012-01-15 15:41:25 +01:00
Vladislav Vaintroub
18c9b345b4 Threadpool -address review comments 2012-01-15 11:17:45 +01:00
Vladislav Vaintroub
c216c9f0f0 Allow for faster creation of threads in corner cases where pool would be overloaded with long non-yielding queries.
To allow it, change minimum of thread_pool_stall_limit to be 10 milliseconds.

Also introduce a new parameter to oversubscribe a group . Number of threads running in  parallel would be higher than it normally should, leading to thrashing, but it may improving preemptiveness, which is useful for the described corner case.
2011-12-31 05:24:11 +01:00
Vladislav Vaintroub
bb0a0c52a6 Make threadpool_stall_limit variable really dynamic 2011-12-29 21:11:06 +01:00
Vladislav Vaintroub
539a7ebe10 LP909537: Ensure thd_wait_begin/thd_wait_end callbacks are called. 2011-12-29 19:37:26 +01:00
Vladislav Vaintroub
bee1d88abf LP909512: Fix crash on tp_set_threadpool_size if threadpool is not used(thread_handling != pool-of-threads) 2011-12-29 12:53:07 +01:00
Vladislav Vaintroub
b9f2fb84f6 Fix LP#909414: Valgrind warnings in threadpool code 2011-12-29 12:17:30 +01:00
Vladislav Vaintroub
54b61b8b44 LP9091416: destroy timer mutex when threadpool scheduler shuts down.
Fixes valgrind warning.
2011-12-29 01:59:05 +01:00
Vladislav Vaintroub
ecad00bc4e use performance-schema friendly mysql_thread_create() instead of pthread_create() 2011-12-28 16:23:46 +01:00
Vladislav Vaintroub
7da4229f2e Fix build on old 32 bit Centos (kernel 2.6.18) 2011-12-26 01:08:46 +01:00
Vladislav Vaintroub
96041f8e1d make sys_vars suite pass 2011-12-20 22:49:24 +01:00
Vladislav Vaintroub
df48c9bf20 allow changing thread_pool_size without server restart 2011-12-19 13:28:30 +01:00
Vladislav Vaintroub
2e4bde4c0f Fix pool_of_threads test case 2011-12-18 23:03:35 +01:00
Vladislav Vaintroub
a5a22e9f64 Small adjustements to threadpool 2011-12-18 20:40:38 +01:00
Vladislav Vaintroub
c439494942 Fix Unix build 2011-12-10 19:35:44 +01:00
Vladislav Vaintroub
e91bbca5fb Initial threadpool implementation for MariaDB 5.5 2011-12-08 19:17:49 +01:00