List:Internals« Previous MessageNext Message »
From:Marko Mäkelä Date:July 6 2005 6:38am
Subject:bk commit into 5.0 tree (marko:1.1895)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of marko. When marko 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.1895 05/07/06 09:38:31 marko@stripped +3 -0
  InnoDB: Make the srv_thread_concurrency checks more consistent.

  sql/ha_innodb.cc
    1.225 05/07/06 09:38:21 marko@stripped +2 -2
    Make use of SRV_CONCURRENCY_THRESHOLD

  innobase/srv/srv0srv.c
    1.90 05/07/06 09:38:21 marko@stripped +3 -14
    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

  innobase/include/srv0srv.h
    1.55 05/07/06 09:38:21 marko@stripped +1 -0
    Define SRV_CONCURRENCY_THRESHOLD

# 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:	marko
# Host:	hundin.mysql.fi
# Root:	/home/marko/mysql-5.0-current

--- 1.54/innobase/include/srv0srv.h	Fri May  6 12:42:44 2005
+++ 1.55/innobase/include/srv0srv.h	Wed Jul  6 09:38:21 2005
@@ -182,6 +182,7 @@
 #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.89/innobase/srv/srv0srv.c	Fri May  6 11:45:50 2005
+++ 1.90/innobase/srv/srv0srv.c	Wed Jul  6 09:38:21 2005
@@ -260,7 +260,7 @@
 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_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 @@
 	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_slot_t*	slot	= NULL;
 
-	if (srv_thread_concurrency >= 500) {
+	if (srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD) {
 	
 		return;
 	}
@@ -1212,11 +1206,6 @@
 	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

--- 1.224/sql/ha_innodb.cc	Mon Jul  4 16:11:54 2005
+++ 1.225/sql/ha_innodb.cc	Wed Jul  6 09:38:21 2005
@@ -326,7 +326,7 @@
 /*=========================*/
 	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 @@
 /*========================*/
 	trx_t*	trx)	/* in: transaction handle */
 {
-	if (UNIV_LIKELY(srv_thread_concurrency >= 20)) {
+	if (UNIV_LIKELY(srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD)) {
 
 		return;
 	}
Thread
bk commit into 5.0 tree (marko:1.1895)Marko Mäkelä6 Jul