summaryrefslogtreecommitdiff
path: root/sql/threadpool_unix.cc
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-10297 Add priorization to threadpoolVladislav Vaintroub2016-09-221-1688/+0
| | | | Also MDEV-10385 Threadpool refactoring
* Merge branch '10.1' into 10.2Sergei Golubchik2016-06-301-2/+4
|\
| * Merge branch '5.5' into bb-10.0Sergei Golubchik2016-06-211-2/+4
| |\
| | * MDEV-10218 - rpl.rpl_binlog_errors fails in buildbot with valgrind warnings -Sergey Vojtovich2016-06-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | bytes are possibly lost Timer thread of threadpool is created "joinable", but they're not "joined" on completion. This causes memory leaks around thread local storage. Fixed by joining timer thread.
* | | Fix threadpool memory leak and connect2 testVladislav Vaintroub2016-03-091-0/+1
| | |
* | | Fix threadpool after it was broken by MDEV-6150Vladislav Vaintroub2016-03-081-16/+15
| | |
* | | Fix compilation10.2-sslVladislav Vaintroub2016-02-101-13/+0
| | |
* | | MDEV-6150 Speed up connection speed by moving creation of THD to new threadMonty2016-02-071-30/+44
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creating a CONNECT object on client connect and pass this to the working thread which creates the THD. Split LOCK_thread_count to different mutexes Added LOCK_thread_start to syncronize threads Moved most usage of LOCK_thread_count to dedicated functions Use next_thread_id() instead of thread_id++ Other things: - Thread id now starts from 1 instead of 2 - Added cast for thread_id as thread id is now of type my_thread_id - Made THD->host const (To ensure it's not changed) - Removed some DBUG_PRINT() about entering/exiting mutex as these was already logged by mutex code - Fixed that aborted_connects and connection_errors_internal are counted in all cases - Don't take locks for current_linfo when we set it (not needed as it was 0 before)
* | MDEV-9156 : Fix tp_add_connection()'s error handlingVladislav Vaintroub2015-12-041-1/+1
| | | | | | | | Avoid possible my_thread_end() in the main polling thread.
* | MDEV-8450: PATCH] Wrong macro expansion in Query_cache::send_result_to_client()Oleksandr Byelkin2015-09-061-1/+1
| | | | | | | | Expression in macro protected by ()
* | Fixing AIX compilation failiresAlexander Barkov2014-02-271-0/+5
| |
* | merge 10-base->10.0unknown2013-11-111-7/+18
|\ \ | |/
| * MDEV-5205 - MariaDB does not start if more than 128 cpu's are availableSergey Vojtovich2013-11-061-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An addition to fix for MDEV-5205, fixes server crash on shutdown. Thread groups are destroyed asynchronously, that is kill server thread sends shutdown request to all thread groups without waiting for compeltion. It means all_groups array must not be freed until all thread groups are down. This patch suggests that all_groups is freed when last thread group is destroyed. Note 1: threadpool code doesn't surround atomic ops with atomic locks, thus no locks for shutdown_group_count. Note 2: this patch preserves old behaviour, but we may need to wait until all thread groups are down before returning from tp_end().
| * MDEV-5205 - MariaDB does not start if more than 128 cpu's are availableSergey Vojtovich2013-11-051-7/+15
| | | | | | | | | | | | | | | | | | | | | | - thread_pool_size command line option upper limit increased to 100 000 (same as for max_connections) - thread_pool_size system variable upper limit is maximum of 128 or the value given at command line - thread groups are now allocated dynamically Different limit for command line option and system variable was done to avoid additional mutex for all_groups and threadpool_max_size.
* | 10.0-base mergeSergei Golubchik2013-07-181-0/+4
|\ \ | |/
| * MDEV-4685 Compile error on LFSSergei Golubchik2013-06-221-0/+4
| | | | | | | | fix the code to compile w/o perfomance schema
* | 10.0-base mergeSergei Golubchik2013-06-061-4/+18
|\ \ | |/ | | | | (without InnoDB - all InnoDB changes were ignored)
| * MDEV-4553 - Fixes for compilation under NetBSD.Vladislav Vaintroub2013-05-271-4/+18
| |
* | 10.0-base mergeSergei Golubchik2013-04-151-9/+8
|\ \ | |/
| * MDEV-4174 - Use kqueue for threadpool implementation on more BSD variants ↵Vladislav Vaintroub2013-02-191-7/+5
| | | | | | | | | | | | | | than just FreeBSD or OSX - i.e NetBSD, OpenBSD, DragonFly, etc.
| * MDEV-4113: Assertion (group->connection_count > 0) fails with Percona server ↵Vladislav Vaintroub2013-01-301-2/+3
| | | | | | | | | | | | | | | | | | in replication test. Assertion happens in replication thread during THD destruction, when thread calls my_sync(), which in turn calls thd_wait_begin() callback. Connection count can be 0, because the counter was decremented before THD destructor. This assertion currently reproducible only in Percona server and not in MariaDB, due to differences in replication code. Fixed by moving code to decrement connection counter after the THD destructor.
* | merge with 5.5Sergei Golubchik2012-11-031-17/+1
|\ \ | |/
| * MDEV-531 : Warning: Forcing close of thread ... in rpl_binlog_indexVladislav Vaintroub2012-11-021-17/+1
| | | | | | | | | | | | Use post_kill_notification in for one_thread_per_connection scheduler, the same as already used in threadpool, to reliably wake a thread stuck in read() or in different poll() variations.
* | Next part of merge. See TODO for detailsMichael Widenius2012-08-141-2/+2
|/
* Threadpool - use EV_ONESHOT with kevent, to prevent race condition when 2Vladislav Vaintroub2012-04-121-12/+4
| | | | threads are retrieving events at the same time.
* Added copiright, some more commentsVladislav Vaintroub2012-02-171-6/+40
|
* address second round review commentsVladislav Vaintroub2012-02-161-50/+60
|
* some more whitespace, remove pending_thread_start_count. increment counters ↵Vladislav Vaintroub2012-01-281-44/+49
| | | | (thread_group->count, thread_group->active_thread_count) whenever mysql_create_thread returns success.
* Threadpool : Rest of monty's reviewVladislav Vaintroub2012-01-271-18/+27
|
* Further review points and simplify Windows implementationVladislav Vaintroub2012-01-261-61/+71
|
* small cleanupsVladislav Vaintroub2012-01-241-2/+0
|
* ensure that lock is held, whenever active thread counter changes.Vladislav Vaintroub2012-01-181-2/+2
| | | | It was not the case inside listener routine.
* Threadpool : address some of the monty's review pointsVladislav Vaintroub2012-01-171-33/+108
| | | | Also, print message when pool blocks.
* Fix threadpool on BSD and SolarisVladislav Vaintroub2012-01-161-3/+3
|
* Get rid of idle thread counter atomic variable.Vladislav Vaintroub2012-01-151-19/+27
| | | | | Instead, use function that loops over groups and calculates idle threads for "show status".
* Threadpool -address review commentsVladislav Vaintroub2012-01-151-257/+406
|
* Allow for faster creation of threads in corner cases where pool would be ↵Vladislav Vaintroub2011-12-311-2/+2
| | | | | | | | 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.
* Make threadpool_stall_limit variable really dynamicVladislav Vaintroub2011-12-291-0/+11
|
* LP909537: Ensure thd_wait_begin/thd_wait_end callbacks are called.Vladislav Vaintroub2011-12-291-1/+1
|
* LP909512: Fix crash on tp_set_threadpool_size if threadpool is not ↵Vladislav Vaintroub2011-12-291-0/+3
| | | | used(thread_handling != pool-of-threads)
* Fix LP#909414: Valgrind warnings in threadpool codeVladislav Vaintroub2011-12-291-0/+2
|
* LP9091416: destroy timer mutex when threadpool scheduler shuts down.Vladislav Vaintroub2011-12-291-0/+5
| | | | Fixes valgrind warning.
* use performance-schema friendly mysql_thread_create() instead of ↵Vladislav Vaintroub2011-12-281-1/+2
| | | | pthread_create()
* Fix build on old 32 bit Centos (kernel 2.6.18)Vladislav Vaintroub2011-12-261-0/+4
|
* make sys_vars suite passVladislav Vaintroub2011-12-201-4/+1
|
* allow changing thread_pool_size without server restartVladislav Vaintroub2011-12-191-39/+147
|
* Fix pool_of_threads test caseVladislav Vaintroub2011-12-181-2/+13
|
* Small adjustements to threadpoolVladislav Vaintroub2011-12-181-1/+0
|
* Fix Unix buildVladislav Vaintroub2011-12-101-11/+10
|
* Initial threadpool implementation for MariaDB 5.5Vladislav Vaintroub2011-12-081-0/+1238