Merge lp:~laurynas-biveinis/percona-server/buf-mutex-split-fixes-5.1 into lp:percona-server/5.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 585
Proposed branch: lp:~laurynas-biveinis/percona-server/buf-mutex-split-fixes-5.1
Merge into: lp:percona-server/5.1
Diff against target: 515 lines (+102/-79)
6 files modified
Percona-Server/storage/innodb_plugin/buf/buf0buf.c (+24/-18)
Percona-Server/storage/innodb_plugin/buf/buf0flu.c (+56/-47)
Percona-Server/storage/innodb_plugin/buf/buf0lru.c (+11/-7)
Percona-Server/storage/innodb_plugin/include/buf0buf.h (+4/-4)
Percona-Server/storage/innodb_plugin/include/buf0flu.h (+4/-1)
Percona-Server/storage/innodb_plugin/include/buf0lru.h (+3/-2)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/buf-mutex-split-fixes-5.1
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Alexey Kopytov (community) Approve
George Ormond Lorch III (community) g2 Approve
Review via email: mp+165526@code.launchpad.net

Description of the change

http://jenkins.percona.com/job/percona-server-5.1-param/543/

Fix several buffer pool mutex split bugs:

- bug 1086680 (Valgrind: free in buf_page_get_gen (Invalid read in
  buf_flush_batch / buf_flush_list) + free in buf_page_get_gen
  (Invalid read in buf_flush_page_and_try_neighbors));

- bug 1103850 (InnoDB: Failing assertion:
  mutex_own(&buf_pool->LRU_list_mutex) in file buf0lru.c line 859);

- bug 1181269 (Unnecessary LRU list mutex acquisition in
  buf_page_io_complete()).

The Valgrind errors and crashes of bug 1086680 happen because of a
race condition involving a dirty compressed page block for which there
is uncompressed page image in the buffer pool.

First, a master thread (or possible another query thread) does a flush
list flush and for that acquires the flush list mutex, gets a pointer
to a page, releases the flush list mutex.

At this point another thread starts reading the same page into the
buffer. Since it is a dirty compressed page, it allocates an
uncompressed page, relocates the page on the flush list, frees the
compressed page descriptor.

At this point the flushing thread proceeds to use the pointer which is
now dangling, causing the issue.

Fix by adjusting buf_flush_batch() to hold the flush list mutex for
all the bpage pointer dereferences. This should not introduce any new
stalls because the mutex is released after checking a few fields
only. This also allows simplifying buf_flush_batch() to become closer
to the InnoDB version, by removing prev_bpage and remaining local
vars. However, this means that buf_flush_ready_for_flush() now
becomes callable with the flush list mutex both held and not held.
This requires additional handling because this function may call
buf_flush_remove() in XtraDB due to the lazy table drop feature. The
latter needs to acquire the flush list mutex, thus we introduce a
boolean have_flush_list_mutex for buf_flush_remove() and
buf_flush_ready_for_flush(), together with additional invariant
asserts.

Bug 1103850 is caused by buf_flush_remove() calling
buf_LRU_insert_zip_clean() for BUF_BLOCK_ZIP_DIRTY pages in debug
builds, which requires the LRU list mutex, which is not always held
here. Fixed by disabling the zip_clean list maintenance for debug
builds. The alternative would be to buffer-fix the block, release and
re-acquire all the mutexes, including the LRU list one. But since
buf_flush_remove() may be called from different contexts holding
different mutexes (also due to bug 1086680 fix), this seems to be very
impractical.

Bug 1181269 is a missed performance improvement opportunity due to
upstream fixing http://bugs.mysql.com/bug.php?id=61341, which made
that buf_LRU_insert_zip_clean() call in buf_flush_remove() confined to
debug builds only. But XtraDB still kept on acquiring the LRU list
mutex buf_flush_write_complete() for flush list flushes, which call
buf_flush_remove(). With the buf_LRU_insert_zip_clean() made
debug-only by upstream and removed by bug 1103850 fix,
buf_flush_write_complete() only has to acquire the LRU list mutex for
the LRU list flushes.

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) wrote :

Nice work, especially the fix for bug 1086680 and the changes in buf_flush_batch.

review: Approve (g2)
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Laurynas,

Thanks for implementing my idea of a fix for bug #1086680.

Approving with a nitpick about a couple of lines not using the InnoDB coding conventions:

+ ut_ad (block_mutex);

and

+ mutex_exit (block_mutex);

review: Approve
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/storage/innodb_plugin/buf/buf0buf.c'
2--- Percona-Server/storage/innodb_plugin/buf/buf0buf.c 2013-08-05 13:11:52 +0000
3+++ Percona-Server/storage/innodb_plugin/buf/buf0buf.c 2013-08-16 08:39:46 +0000
4@@ -210,13 +210,6 @@
5 but not written to disk yet. The block with the oldest modification
6 which has not yet been written to disk is at the end of the chain.
7
8-The chain of unmodified compressed blocks (buf_pool->zip_clean)
9-contains the control blocks (buf_page_t) of those compressed pages
10-that are not in buf_pool->flush_list and for which no uncompressed
11-page has been allocated in the buffer pool. The control blocks for
12-uncompressed pages are accessible via buf_block_t objects that are
13-reachable via buf_pool->chunks[].
14-
15 The chains of free memory blocks (buf_pool->zip_free[]) are used by
16 the buddy allocator (buf0buddy.c) to keep track of currently unused
17 memory blocks of size sizeof(buf_page_t)..UNIV_PAGE_SIZE / 2. These
18@@ -2031,10 +2024,11 @@
19
20 if (buf_page_get_state(&block->page)
21 == BUF_BLOCK_ZIP_PAGE) {
22-#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
23+#if 0
24+ /* Disabled for XtraDB, see buf_flush_remove(). */
25 UT_LIST_REMOVE(zip_list, buf_pool->zip_clean,
26 &block->page);
27-#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
28+#endif
29 ut_ad(!block->page.in_flush_list);
30 } else {
31 /* Relocate buf_pool->flush_list. */
32@@ -2858,11 +2852,12 @@
33
34 /* The block must be put to the LRU list, to the old blocks */
35 buf_LRU_add_block(bpage, TRUE/* to old blocks */);
36-#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
37+#if 0
38+ /* Disabled for XtraDB, see buf_flush_remove(). */
39 mutex_enter(&flush_list_mutex);
40 buf_LRU_insert_zip_clean(bpage);
41 mutex_exit(&flush_list_mutex);
42-#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
43+#endif
44
45 mutex_exit(&LRU_list_mutex);
46
47@@ -3063,6 +3058,7 @@
48 const ibool uncompressed = (buf_page_get_state(bpage)
49 == BUF_BLOCK_FILE_PAGE);
50 mutex_t* block_mutex;
51+ enum buf_flush flush_type = BUF_FLUSH_N_TYPES;
52
53 ut_a(buf_page_in_file(bpage));
54
55@@ -3219,9 +3215,12 @@
56 }
57 }
58
59- //buf_pool_mutex_enter();
60 if (io_type == BUF_IO_WRITE) {
61- mutex_enter(&LRU_list_mutex);
62+
63+ flush_type = buf_page_get_flush_type(bpage);
64+ if (flush_type == BUF_FLUSH_LRU) {
65+ mutex_enter(&LRU_list_mutex);
66+ }
67 }
68 block_mutex = buf_page_get_mutex_enter(bpage);
69 ut_a(block_mutex);
70@@ -3265,10 +3264,9 @@
71
72 buf_flush_write_complete(bpage);
73
74- /* to keep consistency at buf_LRU_insert_zip_clean() */
75- //if (flush_type == BUF_FLUSH_LRU) { /* optimistic! */
76+ if (flush_type == BUF_FLUSH_LRU) {
77 mutex_exit(&LRU_list_mutex);
78- //}
79+ }
80
81 if (uncompressed) {
82 rw_lock_s_unlock_gen(&((buf_block_t*) bpage)->lock,
83@@ -3404,7 +3402,7 @@
84 case BUF_BLOCK_ZIP_PAGE:
85 case BUF_BLOCK_ZIP_DIRTY:
86 /* These should only occur on
87- zip_clean, zip_free[], or flush_list. */
88+ zip_free[], or flush_list. */
89 ut_error;
90 break;
91
92@@ -3480,6 +3478,9 @@
93
94 mutex_enter(&buf_pool_zip_mutex);
95
96+#if 0
97+ /* Disabled for XtraDB, see buf_flush_remove(). */
98+
99 /* Check clean compressed-only blocks. */
100
101 for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b;
102@@ -3505,6 +3506,7 @@
103 n_lru++;
104 n_zip++;
105 }
106+#endif
107
108 /* Check dirty compressed-only blocks. */
109
110@@ -3566,7 +3568,7 @@
111 ut_error;
112 }
113
114- ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == n_lru);
115+ ut_a(UT_LIST_GET_LEN(buf_pool->LRU) >= n_lru);
116 /* because of latching order with block->mutex, we cannot get free_list_mutex before that */
117 /*
118 if (UT_LIST_GET_LEN(buf_pool->free) != n_free) {
119@@ -3766,6 +3768,9 @@
120
121 /* Traverse the lists of clean and dirty compressed-only blocks. */
122
123+#if 0
124+ /* Disabled for XtraDB, see buf_flush_remove(). */
125+
126 for (b = UT_LIST_GET_FIRST(buf_pool->zip_clean); b;
127 b = UT_LIST_GET_NEXT(zip_list, b)) {
128 ut_a(buf_page_get_state(b) == BUF_BLOCK_ZIP_PAGE);
129@@ -3776,6 +3781,7 @@
130 fixed_pages_number++;
131 }
132 }
133+#endif
134
135 mutex_enter(&flush_list_mutex);
136 for (b = UT_LIST_GET_FIRST(buf_pool->flush_list); b;
137
138=== modified file 'Percona-Server/storage/innodb_plugin/buf/buf0flu.c'
139--- Percona-Server/storage/innodb_plugin/buf/buf0flu.c 2013-08-05 13:11:52 +0000
140+++ Percona-Server/storage/innodb_plugin/buf/buf0flu.c 2013-08-16 08:39:46 +0000
141@@ -395,12 +395,18 @@
142 /*======================*/
143 buf_page_t* bpage, /*!< in: buffer control block, must be
144 buf_page_in_file(bpage) */
145- enum buf_flush flush_type)/*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */
146+ enum buf_flush flush_type,/*!< in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */
147+ ibool have_flush_list_mutex)/*!< in: TRUE if flush list mutex
148+ is being held */
149 {
150- //ut_a(buf_page_in_file(bpage));
151- //ut_ad(buf_pool_mutex_own()); /*optimistic...*/
152- ut_ad(mutex_own(buf_page_get_mutex(bpage)));
153- ut_ad(flush_type == BUF_FLUSH_LRU || BUF_FLUSH_LIST);
154+ ut_a(buf_page_in_file(bpage));
155+
156+ ut_ad(have_flush_list_mutex == mutex_own(&flush_list_mutex));
157+ ut_ad(((flush_type == BUF_FLUSH_LRU
158+ && mutex_own(buf_page_get_mutex(bpage)))
159+ || (flush_type == BUF_FLUSH_LIST
160+ && (mutex_own(buf_page_get_mutex(bpage))
161+ || mutex_own(&flush_list_mutex)))));
162
163 if (buf_page_in_file(bpage) && bpage->oldest_modification != 0
164 && buf_page_get_io_fix(bpage) == BUF_IO_NONE) {
165@@ -409,7 +415,7 @@
166 if (bpage->space_was_being_deleted) {
167 /* should be removed from flush_list here */
168 /* because buf_flush_try_neighbors() cannot flush without fil_space_get_size(space) */
169- buf_flush_remove(bpage);
170+ buf_flush_remove(bpage, have_flush_list_mutex);
171 return(FALSE);
172 }
173
174@@ -436,12 +442,16 @@
175 void
176 buf_flush_remove(
177 /*=============*/
178- buf_page_t* bpage) /*!< in: pointer to the block in question */
179+ buf_page_t* bpage, /*!< in: pointer to the block in question */
180+ ibool have_flush_list_mutex) /*!< in: TRUE if
181+ flush_list_mutex is held */
182 {
183- //ut_ad(buf_pool_mutex_own());
184- ut_ad(mutex_own(buf_page_get_mutex(bpage)));
185-
186- mutex_enter(&flush_list_mutex);
187+ if (!have_flush_list_mutex) {
188+ mutex_enter(&flush_list_mutex);
189+ } else {
190+ ut_ad(mutex_own(&flush_list_mutex));
191+ ut_ad(!mutex_own(buf_page_get_mutex(bpage)));
192+ }
193
194 ut_ad(bpage->in_flush_list);
195
196@@ -453,15 +463,17 @@
197 case BUF_BLOCK_READY_FOR_USE:
198 case BUF_BLOCK_MEMORY:
199 case BUF_BLOCK_REMOVE_HASH:
200- mutex_exit(&flush_list_mutex);
201 ut_error;
202 return;
203 case BUF_BLOCK_ZIP_DIRTY:
204 buf_page_set_state(bpage, BUF_BLOCK_ZIP_PAGE);
205 UT_LIST_REMOVE(flush_list, buf_pool->flush_list, bpage);
206-#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
207+#if 0
208+ /* Disabled for XtraDB. The cost of acquiring LRU mutex here
209+ seems to be higher than the benefit of zip_clean list
210+ maintenance. */
211 buf_LRU_insert_zip_clean(bpage);
212-#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
213+#endif
214 break;
215 case BUF_BLOCK_FILE_PAGE:
216 UT_LIST_REMOVE(flush_list, buf_pool->flush_list, bpage);
217@@ -481,7 +493,9 @@
218
219 ut_d(UT_LIST_VALIDATE(flush_list, buf_page_t, buf_pool->flush_list,
220 ut_ad(ut_list_node_313->in_flush_list)));
221- mutex_exit(&flush_list_mutex);
222+ if (!have_flush_list_mutex) {
223+ mutex_exit(&flush_list_mutex);
224+ }
225 }
226
227 /********************************************************************//**
228@@ -554,7 +568,7 @@
229
230 ut_ad(bpage);
231
232- buf_flush_remove(bpage);
233+ buf_flush_remove(bpage, FALSE);
234
235 flush_type = buf_page_get_flush_type(bpage);
236 buf_pool->n_flush[flush_type]--;
237@@ -1089,8 +1103,9 @@
238 //ut_ad(buf_pool_mutex_own());
239 ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
240 ut_ad(mutex_own(&block->mutex));
241+ ut_ad(!mutex_own(&flush_list_mutex));
242
243- if (!buf_flush_ready_for_flush(&block->page, BUF_FLUSH_LRU)) {
244+ if (!buf_flush_ready_for_flush(&block->page, BUF_FLUSH_LRU, FALSE)) {
245 return(FALSE);
246 }
247
248@@ -1171,6 +1186,7 @@
249 ibool is_uncompressed;
250
251 ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST);
252+ ut_ad(!mutex_own(&flush_list_mutex));
253 //ut_ad(buf_pool_mutex_own());
254 #ifdef UNIV_SYNC_DEBUG
255 ut_ad(rw_lock_own(&page_hash_latch, RW_LOCK_EX)
256@@ -1184,7 +1200,7 @@
257 mutex_enter(&buf_pool_mutex);
258 rw_lock_s_unlock(&page_hash_latch);
259
260- ut_ad(buf_flush_ready_for_flush(bpage, flush_type));
261+ ut_ad(buf_flush_ready_for_flush(bpage, flush_type, FALSE));
262
263 buf_page_set_io_fix(bpage, BUF_IO_WRITE);
264
265@@ -1294,6 +1310,7 @@
266 ulint i;
267
268 ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST);
269+ ut_ad(!mutex_own(&flush_list_mutex));
270
271 if (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN || !flush_neighbors) {
272 /* If there is little space, it is better not to flush any
273@@ -1340,7 +1357,9 @@
274 || buf_page_is_old(bpage)) {
275 mutex_t* block_mutex = buf_page_get_mutex_enter(bpage);
276
277- if (block_mutex && buf_flush_ready_for_flush(bpage, flush_type)
278+ if (block_mutex
279+ && buf_flush_ready_for_flush(bpage, flush_type,
280+ FALSE)
281 && (i == offset || !bpage->buf_fix_count)) {
282 /* We only try to flush those
283 neighbors != offset where the buf fix count is
284@@ -1394,11 +1413,9 @@
285 min_n), otherwise ignored */
286 {
287 buf_page_t* bpage;
288- buf_page_t* prev_bpage = NULL;
289 ulint page_count = 0;
290 ulint space;
291 ulint offset;
292- ulint remaining = 0;
293
294 ut_ad((flush_type == BUF_FLUSH_LRU)
295 || (flush_type == BUF_FLUSH_LIST));
296@@ -1445,16 +1462,12 @@
297 ut_ad(flush_type == BUF_FLUSH_LIST);
298
299 mutex_enter(&flush_list_mutex);
300- remaining = UT_LIST_GET_LEN(buf_pool->flush_list);
301 bpage = UT_LIST_GET_LAST(buf_pool->flush_list);
302- if (bpage) {
303- prev_bpage = UT_LIST_GET_PREV(flush_list, bpage);
304- }
305- mutex_exit(&flush_list_mutex);
306 if (!bpage
307 || bpage->oldest_modification >= lsn_limit) {
308 /* We have flushed enough */
309
310+ mutex_exit(&flush_list_mutex);
311 break;
312 }
313 ut_ad(bpage->in_flush_list);
314@@ -1467,24 +1480,29 @@
315 function a pointer to a block in the list! */
316
317 do {
318- mutex_t*block_mutex = buf_page_get_mutex_enter(bpage);
319+ mutex_t*block_mutex = NULL;
320 ibool ready;
321
322- //ut_a(buf_page_in_file(bpage));
323+ ut_a(buf_page_in_file(bpage));
324
325+ if (flush_type == BUF_FLUSH_LRU) {
326+ block_mutex = buf_page_get_mutex_enter(bpage);
327+ ut_ad(block_mutex);
328+ }
329+ ready = buf_flush_ready_for_flush(bpage, flush_type,
330+ (flush_type
331+ == BUF_FLUSH_LIST));
332 if (block_mutex) {
333- ready = buf_flush_ready_for_flush(bpage, flush_type);
334 mutex_exit(block_mutex);
335- } else {
336- ready = FALSE;
337 }
338
339 if (ready) {
340 space = buf_page_get_space(bpage);
341 offset = buf_page_get_page_no(bpage);
342
343- //buf_pool_mutex_exit();
344- if (flush_type == BUF_FLUSH_LRU) {
345+ if (flush_type == BUF_FLUSH_LIST) {
346+ mutex_exit(&flush_list_mutex);
347+ } else if (flush_type == BUF_FLUSH_LRU) {
348 mutex_exit(&LRU_list_mutex);
349 }
350
351@@ -1503,26 +1521,17 @@
352 } else {
353 ut_ad(flush_type == BUF_FLUSH_LIST);
354
355- mutex_enter(&flush_list_mutex);
356 bpage = UT_LIST_GET_PREV(flush_list, bpage);
357- //ut_ad(!bpage || bpage->in_flush_list); /* optimistic */
358- if (bpage != prev_bpage) {
359- /* the search may warp.. retrying */
360- bpage = NULL;
361- }
362- if (bpage) {
363- prev_bpage = UT_LIST_GET_PREV(flush_list, bpage);
364- }
365- mutex_exit(&flush_list_mutex);
366- remaining--;
367+ ut_ad(!bpage || bpage->in_flush_list);
368 }
369 } while (bpage != NULL);
370
371- if (remaining)
372- goto flush_next;
373-
374 /* If we could not find anything to flush, leave the loop */
375
376+ if (flush_type == BUF_FLUSH_LIST) {
377+ mutex_exit(&flush_list_mutex);
378+ }
379+
380 break;
381 }
382
383
384=== modified file 'Percona-Server/storage/innodb_plugin/buf/buf0lru.c'
385--- Percona-Server/storage/innodb_plugin/buf/buf0lru.c 2013-08-05 13:11:52 +0000
386+++ Percona-Server/storage/innodb_plugin/buf/buf0lru.c 2013-08-16 08:39:46 +0000
387@@ -481,7 +481,7 @@
388
389 if (bpage->oldest_modification != 0) {
390
391- buf_flush_remove(bpage);
392+ buf_flush_remove(bpage, FALSE);
393 }
394
395 /* Remove from the LRU list. */
396@@ -540,7 +540,8 @@
397 ut_ad(buf_LRU_drop_page_hash_for_tablespace(id) == 0);
398 }
399
400-#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
401+#if 0
402+/* Disabled for XtraDB, see buf_flush_remove(). */
403 /********************************************************************//**
404 Insert a compressed block into buf_pool->zip_clean in the LRU order. */
405 UNIV_INTERN
406@@ -1452,7 +1453,7 @@
407 }
408
409 if (bpage->space_was_being_deleted && bpage->oldest_modification != 0) {
410- buf_flush_remove(bpage);
411+ buf_flush_remove(bpage, FALSE);
412 }
413
414 #ifdef UNIV_IBUF_COUNT_DEBUG
415@@ -1619,9 +1620,11 @@
416
417 mutex_enter(&flush_list_mutex);
418 if (b->state == BUF_BLOCK_ZIP_PAGE) {
419-#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
420+#if 0
421+ /* Disabled for XtraDB, see
422+ buf_flush_remove(). */
423 buf_LRU_insert_zip_clean(b);
424-#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
425+#endif
426 } else {
427 /* Relocate on buf_pool->flush_list. */
428 buf_flush_relocate_on_flush_list(bpage, b);
429@@ -1920,9 +1923,10 @@
430 ut_a(bpage->zip.data);
431 ut_a(buf_page_get_zip_size(bpage));
432
433-#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
434+#if 0
435+ /* Disabled for XtraDB, see buf_flush_remove(). */
436 UT_LIST_REMOVE(zip_list, buf_pool->zip_clean, bpage);
437-#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
438+#endif
439
440 mutex_exit(&buf_pool_zip_mutex);
441 //buf_pool_mutex_exit_forbid();
442
443=== modified file 'Percona-Server/storage/innodb_plugin/include/buf0buf.h'
444--- Percona-Server/storage/innodb_plugin/include/buf0buf.h 2013-03-06 11:10:14 +0000
445+++ Percona-Server/storage/innodb_plugin/include/buf0buf.h 2013-08-16 08:39:46 +0000
446@@ -1219,7 +1219,6 @@
447 - BUF_BLOCK_NOT_USED: free
448 - BUF_BLOCK_FILE_PAGE: flush_list
449 - BUF_BLOCK_ZIP_DIRTY: flush_list
450- - BUF_BLOCK_ZIP_PAGE: zip_clean
451 - BUF_BLOCK_ZIP_FREE: zip_free[]
452
453 The contents of the list node
454@@ -1233,7 +1232,7 @@
455 /* resplit for optimistic use */
456 UT_LIST_NODE_T(buf_page_t) free;
457 UT_LIST_NODE_T(buf_page_t) flush_list;
458- UT_LIST_NODE_T(buf_page_t) zip_list; /* zip_clean or zip_free[] */
459+ UT_LIST_NODE_T(buf_page_t) zip_list; /* zip_free[] */
460 #ifdef UNIV_DEBUG
461 ibool in_flush_list; /*!< TRUE if in buf_pool->flush_list;
462 when buf_pool_mutex is free, the
463@@ -1587,10 +1586,11 @@
464 frames and buf_page_t descriptors of blocks that exist
465 in the buffer pool only in compressed form. */
466 /* @{ */
467-#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
468+#if 0
469+ /* Disabled for XtraDB, see buf_flush_remove(). */
470 UT_LIST_BASE_NODE_T(buf_page_t) zip_clean;
471 /*!< unmodified compressed pages */
472-#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
473+#endif
474 UT_LIST_BASE_NODE_T(buf_page_t) zip_free[BUF_BUDDY_SIZES_MAX];
475 /*!< buddy free lists */
476 //#if BUF_BUDDY_HIGH != UNIV_PAGE_SIZE
477
478=== modified file 'Percona-Server/storage/innodb_plugin/include/buf0flu.h'
479--- Percona-Server/storage/innodb_plugin/include/buf0flu.h 2013-08-05 13:11:52 +0000
480+++ Percona-Server/storage/innodb_plugin/include/buf0flu.h 2013-08-16 08:39:46 +0000
481@@ -38,7 +38,10 @@
482 void
483 buf_flush_remove(
484 /*=============*/
485- buf_page_t* bpage); /*!< in: pointer to the block in question */
486+ buf_page_t* bpage, /*!< in: pointer to the block in question */
487+ ibool have_flush_list_mutex); /*!< in: TRUE if
488+ flush_list_mutex is held */
489+
490 /********************************************************************//**
491 Relocates a buffer control block on the flush_list.
492 Note that it is assumed that the contents of bpage has already been
493
494=== modified file 'Percona-Server/storage/innodb_plugin/include/buf0lru.h'
495--- Percona-Server/storage/innodb_plugin/include/buf0lru.h 2013-08-05 13:11:52 +0000
496+++ Percona-Server/storage/innodb_plugin/include/buf0lru.h 2013-08-16 08:39:46 +0000
497@@ -79,7 +79,8 @@
498 buf_LRU_mark_space_was_deleted(
499 /*===========================*/
500 ulint id); /*!< in: space id */
501-#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
502+#if 0
503+/* Disabled for XtraDB, see buf_flush_remove(). */
504 /********************************************************************//**
505 Insert a compressed block into buf_pool->zip_clean in the LRU order. */
506 UNIV_INTERN
507@@ -87,7 +88,7 @@
508 buf_LRU_insert_zip_clean(
509 /*=====================*/
510 buf_page_t* bpage); /*!< in: pointer to the block in question */
511-#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
512+#endif
513
514 /******************************************************************//**
515 Try to free a block. If bpage is a descriptor of a compressed-only

Subscribers

People subscribed via source and target branches