Merge lp:~percona-dev/percona-xtradb/fix-bug-405714 into lp:~percona-dev/percona-xtradb/extensions-1.0

Proposed by Yasufumi Kinoshita
Status: Merged
Merge reported by: Yasufumi Kinoshita
Merged at revision: not available
Proposed branch: lp:~percona-dev/percona-xtradb/fix-bug-405714
Merge into: lp:~percona-dev/percona-xtradb/extensions-1.0
Diff against target: None lines
To merge this branch: bzr merge lp:~percona-dev/percona-xtradb/fix-bug-405714
Reviewer Review Type Date Requested Status
Vadim Tkachenko Approve
Review via email: mp+9500@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vadim Tkachenko (vadim-tk) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'innodb_io_patches.patch'
2--- innodb_io_patches.patch 2009-07-02 06:58:13 +0000
3+++ innodb_io_patches.patch 2009-07-31 09:50:43 +0000
4@@ -1,33 +1,38 @@
5 diff -ru innodb_plugin-1.0.3_orig/buf/buf0flu.c innodb_plugin-1.0.3_tmp/buf/buf0flu.c
6 --- innodb_plugin-1.0.3_orig/buf/buf0flu.c 2009-02-17 17:12:02.000000000 +0900
7-+++ innodb_plugin-1.0.3_tmp/buf/buf0flu.c 2009-07-01 20:15:34.000000000 +0900
8-@@ -1048,9 +1048,23 @@
9-
10- old_page_count = page_count;
11-
12-+ if (srv_flush_neighbor_pages) {
13++++ innodb_plugin-1.0.3_tmp/buf/buf0flu.c 2009-07-31 18:29:23.000000000 +0900
14+@@ -863,8 +863,9 @@
15+ /* out: number of pages flushed */
16+ ulint space, /* in: space id */
17+ ulint offset, /* in: page offset */
18+- enum buf_flush flush_type) /* in: BUF_FLUSH_LRU or
19++ enum buf_flush flush_type, /* in: BUF_FLUSH_LRU or
20+ BUF_FLUSH_LIST */
21++ ulint flush_neighbors)
22+ {
23+ buf_page_t* bpage;
24+ ulint low, high;
25+@@ -873,7 +874,7 @@
26+
27+ ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST);
28+
29+- if (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN) {
30++ if (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN || !flush_neighbors) {
31+ /* If there is little space, it is better not to flush any
32+ block except from the end of the LRU list */
33+
34+@@ -1050,7 +1051,7 @@
35+
36 /* Try to flush also all the neighbors */
37 page_count += buf_flush_try_neighbors(
38- space, offset, flush_type);
39-+ } else {
40-+ /* Try to flush the page only */
41-+ buf_pool_mutex_enter();
42-+
43-+ mutex_t* block_mutex = buf_page_get_mutex(bpage);
44-+ mutex_enter(block_mutex);
45-+
46-+ buf_page_t* bpage_tmp = buf_page_hash_get(space, offset);
47-+ if (bpage_tmp) {
48-+ buf_flush_page(bpage_tmp, flush_type);
49-+ page_count++;
50-+ }
51-+ }
52+- space, offset, flush_type);
53++ space, offset, flush_type, srv_flush_neighbor_pages);
54 /* fprintf(stderr,
55 "Flush type %lu, page no %lu, neighb %lu\n",
56 flush_type, offset,
57 diff -ru innodb_plugin-1.0.3_orig/buf/buf0rea.c innodb_plugin-1.0.3_tmp/buf/buf0rea.c
58 --- innodb_plugin-1.0.3_orig/buf/buf0rea.c 2009-02-17 17:12:02.000000000 +0900
59-+++ innodb_plugin-1.0.3_tmp/buf/buf0rea.c 2009-07-01 20:15:34.000000000 +0900
60++++ innodb_plugin-1.0.3_tmp/buf/buf0rea.c 2009-07-31 18:25:18.000000000 +0900
61 @@ -36,6 +36,7 @@
62 #include "os0file.h"
63 #include "srv0start.h"
64@@ -59,8 +64,8 @@
65 /* No read-ahead to avoid thread deadlocks */
66 return(0);
67 diff -ru innodb_plugin-1.0.3_orig/handler/ha_innodb.cc innodb_plugin-1.0.3_tmp/handler/ha_innodb.cc
68---- innodb_plugin-1.0.3_orig/handler/ha_innodb.cc 2009-07-01 20:15:18.000000000 +0900
69-+++ innodb_plugin-1.0.3_tmp/handler/ha_innodb.cc 2009-07-02 14:14:42.000000000 +0900
70+--- innodb_plugin-1.0.3_orig/handler/ha_innodb.cc 2009-07-31 18:24:56.000000000 +0900
71++++ innodb_plugin-1.0.3_tmp/handler/ha_innodb.cc 2009-07-31 18:25:18.000000000 +0900
72 @@ -143,6 +143,7 @@
73 innobase_force_recovery, innobase_open_files,
74 innobase_autoinc_lock_mode;
75@@ -221,8 +226,8 @@
76 MYSQL_SYSVAR(change_buffering),
77 NULL
78 diff -ru innodb_plugin-1.0.3_orig/handler/innodb_patch_info.h innodb_plugin-1.0.3_tmp/handler/innodb_patch_info.h
79---- innodb_plugin-1.0.3_orig/handler/innodb_patch_info.h 2009-07-01 20:15:18.000000000 +0900
80-+++ innodb_plugin-1.0.3_tmp/handler/innodb_patch_info.h 2009-07-01 20:15:34.000000000 +0900
81+--- innodb_plugin-1.0.3_orig/handler/innodb_patch_info.h 2009-07-31 18:24:56.000000000 +0900
82++++ innodb_plugin-1.0.3_tmp/handler/innodb_patch_info.h 2009-07-31 18:25:18.000000000 +0900
83 @@ -25,5 +25,6 @@
84 }innodb_enhancements[] = {
85 {"xtradb_show_enhancements","I_S.XTRADB_ENHANCEMENTS","","http://www.percona.com/docs/wiki/percona-xtradb"},
86@@ -232,7 +237,7 @@
87 };
88 diff -ru innodb_plugin-1.0.3_orig/ibuf/ibuf0ibuf.c innodb_plugin-1.0.3_tmp/ibuf/ibuf0ibuf.c
89 --- innodb_plugin-1.0.3_orig/ibuf/ibuf0ibuf.c 2009-02-17 17:55:41.000000000 +0900
90-+++ innodb_plugin-1.0.3_tmp/ibuf/ibuf0ibuf.c 2009-07-01 20:15:34.000000000 +0900
91++++ innodb_plugin-1.0.3_tmp/ibuf/ibuf0ibuf.c 2009-07-31 18:25:18.000000000 +0900
92 @@ -422,8 +422,10 @@
93 grow in size, as the references on the upper levels of the tree can
94 change */
95@@ -262,7 +267,7 @@
96
97 diff -ru innodb_plugin-1.0.3_orig/include/log0log.h innodb_plugin-1.0.3_tmp/include/log0log.h
98 --- innodb_plugin-1.0.3_orig/include/log0log.h 2009-02-17 18:12:41.000000000 +0900
99-+++ innodb_plugin-1.0.3_tmp/include/log0log.h 2009-07-01 20:15:34.000000000 +0900
100++++ innodb_plugin-1.0.3_tmp/include/log0log.h 2009-07-31 18:25:18.000000000 +0900
101 @@ -186,6 +186,13 @@
102 log_buffer_flush_to_disk(void);
103 /*==========================*/
104@@ -279,7 +284,7 @@
105 be called if the calling thread owns no synchronization objects! */
106 diff -ru innodb_plugin-1.0.3_orig/include/os0file.h innodb_plugin-1.0.3_tmp/include/os0file.h
107 --- innodb_plugin-1.0.3_orig/include/os0file.h 2009-02-17 18:18:35.000000000 +0900
108-+++ innodb_plugin-1.0.3_tmp/include/os0file.h 2009-07-01 20:15:34.000000000 +0900
109++++ innodb_plugin-1.0.3_tmp/include/os0file.h 2009-07-31 18:25:18.000000000 +0900
110 @@ -577,8 +577,10 @@
111 /*========*/
112 ulint n, /* in: maximum number of pending aio operations
113@@ -294,8 +299,8 @@
114 /***********************************************************************
115 Requests an asynchronous i/o operation. */
116 diff -ru innodb_plugin-1.0.3_orig/include/srv0srv.h innodb_plugin-1.0.3_tmp/include/srv0srv.h
117---- innodb_plugin-1.0.3_orig/include/srv0srv.h 2009-07-01 20:15:18.000000000 +0900
118-+++ innodb_plugin-1.0.3_tmp/include/srv0srv.h 2009-07-01 20:15:34.000000000 +0900
119+--- innodb_plugin-1.0.3_orig/include/srv0srv.h 2009-07-31 18:24:56.000000000 +0900
120++++ innodb_plugin-1.0.3_tmp/include/srv0srv.h 2009-07-31 18:25:18.000000000 +0900
121 @@ -126,6 +126,8 @@
122 extern ulint srv_lock_table_size;
123
124@@ -324,7 +329,7 @@
125 extern ulint srv_n_rows_inserted;
126 diff -ru innodb_plugin-1.0.3_orig/log/log0log.c innodb_plugin-1.0.3_tmp/log/log0log.c
127 --- innodb_plugin-1.0.3_orig/log/log0log.c 2009-02-17 18:50:12.000000000 +0900
128-+++ innodb_plugin-1.0.3_tmp/log/log0log.c 2009-07-01 20:15:34.000000000 +0900
129++++ innodb_plugin-1.0.3_tmp/log/log0log.c 2009-07-31 18:25:18.000000000 +0900
130 @@ -1526,6 +1526,26 @@
131 }
132
133@@ -370,7 +375,7 @@
134 time_elapsed = 0.001 + difftime(current_time,
135 diff -ru innodb_plugin-1.0.3_orig/os/os0file.c innodb_plugin-1.0.3_tmp/os/os0file.c
136 --- innodb_plugin-1.0.3_orig/os/os0file.c 2009-02-17 18:53:58.000000000 +0900
137-+++ innodb_plugin-1.0.3_tmp/os/os0file.c 2009-07-01 20:15:34.000000000 +0900
138++++ innodb_plugin-1.0.3_tmp/os/os0file.c 2009-07-31 18:25:18.000000000 +0900
139 @@ -73,6 +73,28 @@
140
141 UNIV_INTERN ibool os_aio_print_debug = FALSE;
142@@ -879,8 +884,8 @@
143 *message1 = slot->message1;
144 *message2 = slot->message2;
145 diff -ru innodb_plugin-1.0.3_orig/srv/srv0srv.c innodb_plugin-1.0.3_tmp/srv/srv0srv.c
146---- innodb_plugin-1.0.3_orig/srv/srv0srv.c 2009-07-01 20:15:18.000000000 +0900
147-+++ innodb_plugin-1.0.3_tmp/srv/srv0srv.c 2009-07-02 14:14:59.000000000 +0900
148+--- innodb_plugin-1.0.3_orig/srv/srv0srv.c 2009-07-31 18:24:56.000000000 +0900
149++++ innodb_plugin-1.0.3_tmp/srv/srv0srv.c 2009-07-31 18:25:18.000000000 +0900
150 @@ -177,6 +177,8 @@
151 UNIV_INTERN ulint srv_lock_table_size = ULINT_MAX;
152
153@@ -1208,7 +1213,7 @@
154
155 diff -ru innodb_plugin-1.0.3_orig/srv/srv0start.c innodb_plugin-1.0.3_tmp/srv/srv0start.c
156 --- innodb_plugin-1.0.3_orig/srv/srv0start.c 2009-03-05 20:49:51.000000000 +0900
157-+++ innodb_plugin-1.0.3_tmp/srv/srv0start.c 2009-07-01 20:15:34.000000000 +0900
158++++ innodb_plugin-1.0.3_tmp/srv/srv0start.c 2009-07-31 18:25:18.000000000 +0900
159 @@ -1252,24 +1252,28 @@
160 return(DB_ERROR);
161 }
162
163=== modified file 'innodb_split_buf_pool_mutex.patch'
164--- innodb_split_buf_pool_mutex.patch 2009-07-24 21:26:23 +0000
165+++ innodb_split_buf_pool_mutex.patch 2009-07-31 09:50:43 +0000
166@@ -2043,25 +2043,6 @@
167
168 old_page_count = page_count;
169
170-@@ -1057,10 +1107,17 @@
171- space, offset, flush_type);
172- } else {
173- /* Try to flush the page only */
174-- buf_pool_mutex_enter();
175-+ //buf_pool_mutex_enter();
176-+ rw_lock_s_lock(&page_hash_latch);
177-
178- mutex_t* block_mutex = buf_page_get_mutex(bpage);
179-+retry_lock_2:
180- mutex_enter(block_mutex);
181-+ if (block_mutex != buf_page_get_mutex(bpage)) {
182-+ mutex_exit(block_mutex);
183-+ block_mutex = buf_page_get_mutex(bpage);
184-+ goto retry_lock_2;
185-+ }
186-
187- buf_page_t* bpage_tmp = buf_page_hash_get(space, offset);
188- if (bpage_tmp) {
189 @@ -1073,7 +1130,10 @@
190 flush_type, offset,
191 page_count - old_page_count); */

Subscribers

People subscribed via source and target branches

to all changes: