List:Commits« Previous MessageNext Message »
From:Alex Ivanov Date:January 18 2006 12:21pm
Subject:bk commit into 5.0 tree (aivanov:1.2031)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of alexi. When alexi does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2031 06/01/18 15:20:56 aivanov@stripped +6 -0
  Applied patch recieved from Marko:
   Make innodb_thread_concurrency 0 by default, and extend the usable
   range from 0 to 1000 (0 disables the thread throttling).

  sql/mysqld.cc
    1.531 06/01/18 15:20:47 aivanov@stripped +4 -2
    innodb_thread_concurrency is 0..1000 now, and 0 (the default)
     disables the thread throttling.
    

  sql/ha_innodb.cc
    1.285 06/01/18 15:20:47 aivanov@stripped +2 -2
    Remove SRV_CONCURRENCY_THRESHOLD. The magic value is 0 from now on.

  mysql-test/t/innodb.test
    1.123 06/01/18 15:20:47 aivanov@stripped +1 -1
    innodb_thread_concurrency is 0..1000 now.

  mysql-test/r/innodb.result
    1.153 06/01/18 15:20:47 aivanov@stripped +3 -3
    innodb_thread_concurrency is 0..1000 now, and the default is 0.

  innobase/srv/srv0srv.c
    1.97 06/01/18 15:20:46 aivanov@stripped +5 -4
    Remove SRV_CONCURRENCY_THRESHOLD. The magic value is 0 from now on.

  innobase/include/srv0srv.h
    1.60 06/01/18 15:20:46 aivanov@stripped +0 -1
    Remove SRV_CONCURRENCY_THRESHOLD. The magic value is 0 from now on.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	aivanov
# Host:	mysql.creware.com
# Root:	/home/alexi/innodb-ss/mysql-5.0-ss-patches

--- 1.530/sql/mysqld.cc	2006-01-18 15:01:54 +03:00
+++ 1.531/sql/mysqld.cc	2006-01-18 15:20:47 +03:00
@@ -5504,9 +5504,11 @@
    (gptr*) &srv_n_spin_wait_rounds,
    0, GET_LONG, REQUIRED_ARG, 20L, 0L, ~0L, 0, 1L, 0},
   {"innodb_thread_concurrency", OPT_INNODB_THREAD_CONCURRENCY,
-   "Helps in performance tuning in heavily concurrent environments.",
+   "Helps in performance tuning in heavily concurrent environments. "
+   "Sets the maximum number of threads allowed inside InnoDB. Value 0"
+   " will disable the thread throttling.",
    (gptr*) &srv_thread_concurrency, (gptr*) &srv_thread_concurrency,
-   0, GET_LONG, REQUIRED_ARG, 20, 1, 1000, 0, 1, 0},
+   0, GET_LONG, REQUIRED_ARG, 0, 0, 1000, 0, 1, 0},
   {"innodb_commit_concurrency", OPT_INNODB_THREAD_CONCURRENCY,
    "Helps in performance tuning in heavily concurrent environments.",
    (gptr*) &srv_commit_concurrency, (gptr*) &srv_commit_concurrency,

--- 1.59/innobase/include/srv0srv.h	2006-01-18 15:01:53 +03:00
+++ 1.60/innobase/include/srv0srv.h	2006-01-18 15:20:46 +03:00
@@ -195,7 +195,6 @@
 #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 */

--- 1.96/innobase/srv/srv0srv.c	2006-01-18 15:01:53 +03:00
+++ 1.97/innobase/srv/srv0srv.c	2006-01-18 15:20:46 +03:00
@@ -258,9 +258,10 @@
 we could get a deadlock. MySQL creates a thread for each user session, and
 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. */
+computer. Bigger computers need bigger values. Value 0 will disable the
+concurrency check. */
 
-ulong	srv_thread_concurrency	= SRV_CONCURRENCY_THRESHOLD;
+ulong	srv_thread_concurrency	= 0;
 ulong   srv_commit_concurrency  = 0;
 
 os_fast_mutex_t	srv_conc_mutex;		/* this mutex protects srv_conc data
@@ -1141,7 +1142,7 @@
 	trx_t*	trx)	/* in: transaction object associated with the
 			thread */
 {
-	if (srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD) {
+	if (UNIV_LIKELY(!srv_thread_concurrency)) {
 	
 		return;
 	}
@@ -1167,7 +1168,7 @@
 {
 	srv_conc_slot_t*	slot	= NULL;
 
-	if (srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD) {
+	if (UNIV_LIKELY(!srv_thread_concurrency)) {
 	
 		return;
 	}

--- 1.152/mysql-test/r/innodb.result	2006-01-16 14:03:55 +03:00
+++ 1.153/mysql-test/r/innodb.result	2006-01-18 15:20:47 +03:00
@@ -1821,15 +1821,15 @@
 innodb_sync_spin_loops	20
 show variables like "innodb_thread_concurrency";
 Variable_name	Value
-innodb_thread_concurrency	20
-set global innodb_thread_concurrency=1000;
+innodb_thread_concurrency	0
+set global innodb_thread_concurrency=1001;
 show variables like "innodb_thread_concurrency";
 Variable_name	Value
 innodb_thread_concurrency	1000
 set global innodb_thread_concurrency=0;
 show variables like "innodb_thread_concurrency";
 Variable_name	Value
-innodb_thread_concurrency	1
+innodb_thread_concurrency	0
 set global innodb_thread_concurrency=16;
 show variables like "innodb_thread_concurrency";
 Variable_name	Value

--- 1.122/mysql-test/t/innodb.test	2006-01-16 14:03:55 +03:00
+++ 1.123/mysql-test/t/innodb.test	2006-01-18 15:20:47 +03:00
@@ -1316,7 +1316,7 @@
 
 # Test for innodb_thread_concurrency variable
 show variables like "innodb_thread_concurrency";
-set global innodb_thread_concurrency=1000;
+set global innodb_thread_concurrency=1001;
 show variables like "innodb_thread_concurrency";
 set global innodb_thread_concurrency=0;
 show variables like "innodb_thread_concurrency";

--- 1.284/sql/ha_innodb.cc	2006-01-18 15:01:53 +03:00
+++ 1.285/sql/ha_innodb.cc	2006-01-18 15:20:47 +03:00
@@ -338,7 +338,7 @@
 /*=========================*/
 	trx_t*	trx)	/* in: transaction handle */
 {
-	if (UNIV_LIKELY(srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD)) {
+	if (UNIV_LIKELY(!srv_thread_concurrency)) {
 
 		return;
 	}
@@ -355,7 +355,7 @@
 /*========================*/
 	trx_t*	trx)	/* in: transaction handle */
 {
-	if (UNIV_LIKELY(srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD)) {
+	if (UNIV_LIKELY(!srv_thread_concurrency)) {
 
 		return;
 	}
Thread
bk commit into 5.0 tree (aivanov:1.2031)Alex Ivanov18 Jan