summaryrefslogtreecommitdiff
path: root/innobase/srv
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-07-06 09:38:31 +0300
committerunknown <marko@hundin.mysql.fi>2005-07-06 09:38:31 +0300
commitec6b1999a5c51f108a49d3b15a7dd935febb1632 (patch)
treef3295bc3f1f368875f4b9869737386a53ab0f0ae /innobase/srv
parentde40177365db3a3a36a2f78087ff331ad16c4e16 (diff)
downloadmariadb-git-ec6b1999a5c51f108a49d3b15a7dd935febb1632.tar.gz
InnoDB: Make the srv_thread_concurrency checks more consistent.
innobase/include/srv0srv.h: Define SRV_CONCURRENCY_THRESHOLD innobase/srv/srv0srv.c: Remove srv_thread_concurrency check from srv_conc_enter_innodb() and srv_conc_exit_innodb(), as the check is in the (only) caller of these functions, in ha_innodb.cc. srv_conc_force_enter_innodb(), srv_conc_force_exit_innodb(): Check for srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD sql/ha_innodb.cc: Make use of SRV_CONCURRENCY_THRESHOLD
Diffstat (limited to 'innobase/srv')
-rw-r--r--innobase/srv/srv0srv.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index f901425a5f9..837c5be2bb6 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -260,7 +260,7 @@ semaphore contention and convoy problems can occur withput this restriction.
Value 10 should be good if there are less than 4 processors + 4 disks in the
computer. Bigger computers need bigger values. */
-ulong srv_thread_concurrency = 8;
+ulong srv_thread_concurrency = SRV_CONCURRENCY_THRESHOLD;
os_fast_mutex_t srv_conc_mutex; /* this mutex protects srv_conc data
structures */
@@ -983,12 +983,6 @@ srv_conc_enter_innodb(
srv_conc_slot_t* slot = NULL;
ulint i;
- if (srv_thread_concurrency >= 500) {
- /* Disable the concurrency check */
-
- return;
- }
-
/* If trx has 'free tickets' to enter the engine left, then use one
such ticket */
@@ -1134,7 +1128,7 @@ srv_conc_force_enter_innodb(
trx_t* trx) /* in: transaction object associated with the
thread */
{
- if (srv_thread_concurrency >= 500) {
+ if (srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD) {
return;
}
@@ -1160,7 +1154,7 @@ srv_conc_force_exit_innodb(
{
srv_conc_slot_t* slot = NULL;
- if (srv_thread_concurrency >= 500) {
+ if (srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD) {
return;
}
@@ -1212,11 +1206,6 @@ srv_conc_exit_innodb(
trx_t* trx) /* in: transaction object associated with the
thread */
{
- if (srv_thread_concurrency >= 500) {
-
- return;
- }
-
if (trx->n_tickets_to_enter_innodb > 0) {
/* We will pretend the thread is still inside InnoDB though it
now leaves the InnoDB engine. In this way we save