~percona-dev/percona-server/windows-fixes

« back to all changes in this revision

Viewing changes to innodb_thread_concurrency_timer_based.patch

  • Committer: kinoyasu
  • Date: 2011-02-14 10:30:18 UTC
  • Revision ID: kinoyasu@gauntlet4-20110214103018-f14xhxs0lp9n3xlj
port Yasufumi patches to 5.5.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 static long long innobase_buffer_pool_size, innobase_log_file_size;
17
17
 
18
18
 /** Percentage of the buffer pool to reserve for 'old' blocks.
19
 
@@ -2496,6 +2497,9 @@
 
19
@@ -2497,6 +2498,9 @@
20
20
        srv_n_log_files = (ulint) innobase_log_files_in_group;
21
21
        srv_log_file_size = (ulint) innobase_log_file_size;
22
22
 
26
26
 #ifdef UNIV_LOG_ARCHIVE
27
27
        srv_log_archive_on = (ulint) innobase_log_archive;
28
28
 #endif /* UNIV_LOG_ARCHIVE */
29
 
@@ -11373,6 +11377,12 @@
 
29
@@ -11375,6 +11379,12 @@
30
30
   "Maximum delay between polling for a spin lock (6 by default)",
31
31
   NULL, NULL, 6L, 0L, ~0L, 0);
32
32
 
39
39
 static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency,
40
40
   PLUGIN_VAR_RQCMDARG,
41
41
   "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.",
42
 
@@ -11586,6 +11596,7 @@
 
42
@@ -11588,6 +11598,7 @@
43
43
   MYSQL_SYSVAR(spin_wait_delay),
44
44
   MYSQL_SYSVAR(table_locks),
45
45
   MYSQL_SYSVAR(thread_concurrency),
62
62
diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
63
63
--- a/storage/innobase/srv/srv0srv.c    2010-12-03 15:37:45.546023493 +0900
64
64
+++ b/storage/innobase/srv/srv0srv.c    2010-12-03 15:42:11.574955879 +0900
65
 
@@ -344,6 +344,7 @@
 
65
@@ -346,6 +346,7 @@
66
66
 computer. Bigger computers need bigger values. Value 0 will disable the
67
67
 concurrency check. */
68
68
 
70
70
 UNIV_INTERN ulong      srv_thread_concurrency  = 0;
71
71
 
72
72
 /* this mutex protects srv_conc data structures */
73
 
@@ -1130,6 +1131,75 @@
 
73
@@ -1164,6 +1165,75 @@
74
74
 /*********************************************************************//**
75
75
 Puts an OS thread to wait if there are too many concurrent threads
76
76
 (>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */
146
146
 UNIV_INTERN
147
147
 void
148
148
 srv_conc_enter_innodb(
149
 
@@ -1160,6 +1230,13 @@
 
149
@@ -1194,6 +1264,13 @@
150
150
                return;
151
151
        }
152
152
 
160
160
        os_fast_mutex_lock(&srv_conc_mutex);
161
161
 retry:
162
162
        if (trx->declared_to_be_inside_innodb) {
163
 
@@ -1305,6 +1382,14 @@
 
163
@@ -1339,6 +1416,14 @@
164
164
        }
165
165
 
166
166
        ut_ad(srv_conc_n_threads >= 0);
175
175
 
176
176
        os_fast_mutex_lock(&srv_conc_mutex);
177
177
 
178
 
@@ -1338,6 +1423,13 @@
 
178
@@ -1372,6 +1457,13 @@
179
179
                return;
180
180
        }
181
181