summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-07-06 12:29:20 +0300
committerunknown <marko@hundin.mysql.fi>2005-07-06 12:29:20 +0300
commit4c971b32fe6108154919f1c3df02f40f460db3f3 (patch)
treeb76717bf390b6edc2b0d1b491ce21a6d799dca3a
parentea2943e589f939dc333935a30308080363ac1181 (diff)
parentf2203434d5b5fa77fd8e92d4ff3974a8a48ccc93 (diff)
downloadmariadb-git-clone-5.0.9-build.tar.gz
Merge marko@bk-internal.mysql.com:/home/bk/mysql-5.0clone-5.0.9-build
into hundin.mysql.fi:/home/marko/mysql-5.0-current
-rw-r--r--innobase/include/srv0srv.h1
-rw-r--r--innobase/srv/srv0srv.c17
-rw-r--r--sql/ha_innodb.cc4
3 files changed, 6 insertions, 16 deletions
diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
index 6e4241965c1..116ae7b6438 100644
--- a/innobase/include/srv0srv.h
+++ b/innobase/include/srv0srv.h
@@ -182,6 +182,7 @@ extern mutex_t* kernel_mutex_temp;/* mutex protecting the server, trx structs,
#define kernel_mutex (*kernel_mutex_temp)
#define SRV_MAX_N_IO_THREADS 100
+#define SRV_CONCURRENCY_THRESHOLD 20
/* Array of English strings describing the current state of an
i/o handler thread */
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
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 8218e4fecc0..e33a0939e27 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -326,7 +326,7 @@ innodb_srv_conc_enter_innodb(
/*=========================*/
trx_t* trx) /* in: transaction handle */
{
- if (UNIV_LIKELY(srv_thread_concurrency >= 20)) {
+ if (UNIV_LIKELY(srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD)) {
return;
}
@@ -343,7 +343,7 @@ innodb_srv_conc_exit_innodb(
/*========================*/
trx_t* trx) /* in: transaction handle */
{
- if (UNIV_LIKELY(srv_thread_concurrency >= 20)) {
+ if (UNIV_LIKELY(srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD)) {
return;
}