Skip to content

Commit dfb001e

Browse files
author
Sergei Golubchik
committed
percona-server-5.6.22-72.0
1 parent 67da9e8 commit dfb001e

File tree

10 files changed

+32
-32
lines changed

10 files changed

+32
-32
lines changed

buf/buf0buf.cc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ UNIV_INTERN mysql_pfs_key_t buf_block_debug_latch_key;
294294

295295
#ifdef UNIV_PFS_MUTEX
296296
UNIV_INTERN mysql_pfs_key_t buffer_block_mutex_key;
297-
UNIV_INTERN mysql_pfs_key_t buf_pool_mutex_key;
298297
UNIV_INTERN mysql_pfs_key_t buf_pool_zip_mutex_key;
299298
UNIV_INTERN mysql_pfs_key_t buf_pool_flush_state_mutex_key;
300299
UNIV_INTERN mysql_pfs_key_t buf_pool_LRU_list_mutex_key;
@@ -1735,16 +1734,12 @@ buf_pool_watch_set(
17351734
ut_ad(!bpage->in_page_hash);
17361735
ut_ad(bpage->buf_fix_count == 0);
17371736

1738-
mutex_enter(&buf_pool->zip_mutex);
1739-
17401737
bpage->state = BUF_BLOCK_ZIP_PAGE;
17411738
bpage->space = static_cast<ib_uint32_t>(space);
17421739
bpage->offset = static_cast<ib_uint32_t>(offset);
17431740
bpage->buf_fix_count = 1;
17441741
bpage->buf_pool_index = buf_pool_index(buf_pool);
17451742

1746-
mutex_exit(&buf_pool->zip_mutex);
1747-
17481743
ut_d(bpage->in_page_hash = TRUE);
17491744
HASH_INSERT(buf_page_t, hash, buf_pool->page_hash,
17501745
fold, bpage);
@@ -1796,7 +1791,6 @@ buf_pool_watch_remove(
17961791
#endif /* UNIV_SYNC_DEBUG */
17971792

17981793
ut_ad(buf_page_get_state(watch) == BUF_BLOCK_ZIP_PAGE);
1799-
ut_ad(buf_own_zip_mutex_for_page(watch));
18001794

18011795
HASH_DELETE(buf_page_t, hash, buf_pool->page_hash, fold, watch);
18021796
ut_d(watch->in_page_hash = FALSE);
@@ -1839,9 +1833,7 @@ buf_pool_watch_unset(
18391833
#endif /* PAGE_ATOMIC_REF_COUNT */
18401834

18411835
if (bpage->buf_fix_count == 0) {
1842-
mutex_enter(&buf_pool->zip_mutex);
18431836
buf_pool_watch_remove(buf_pool, fold, bpage);
1844-
mutex_exit(&buf_pool->zip_mutex);
18451837
}
18461838
}
18471839

@@ -4421,7 +4413,7 @@ buf_page_io_complete(
44214413
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
44224414
buf_page_get_flush_type(bpage) == BUF_FLUSH_LRU)) {
44234415

4424-
have_LRU_mutex = TRUE; /* optimistic */
4416+
have_LRU_mutex = true; /* optimistic */
44254417
}
44264418
retry_mutex:
44274419
if (have_LRU_mutex) {
@@ -4441,7 +4433,7 @@ buf_page_io_complete(
44414433
&& !have_LRU_mutex)) {
44424434

44434435
mutex_exit(block_mutex);
4444-
have_LRU_mutex = TRUE;
4436+
have_LRU_mutex = true;
44454437
goto retry_mutex;
44464438
}
44474439

buf/buf0flu.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,8 +1098,8 @@ buf_flush_page(
10981098
# if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
10991099
/********************************************************************//**
11001100
Writes a flushable page asynchronously from the buffer pool to a file.
1101-
NOTE: block->mutex must be held upon entering this function, and it will be
1102-
released by this function after flushing. This is loosely based on
1101+
NOTE: block and LRU list mutexes must be held upon entering this function, and
1102+
they will be released by this function after flushing. This is loosely based on
11031103
buf_flush_batch() and buf_flush_page().
11041104
@return TRUE if the page was flushed and the mutexes released */
11051105
UNIV_INTERN
@@ -1653,6 +1653,8 @@ buf_do_LRU_batch(
16531653
flush_counters_t* n) /*!< out: flushed/evicted page
16541654
counts */
16551655
{
1656+
ut_ad(mutex_own(&buf_pool->LRU_list_mutex));
1657+
16561658
if (buf_LRU_evict_from_unzip_LRU(buf_pool)) {
16571659
n->unzip_LRU_evicted
16581660
= buf_free_from_unzip_LRU_list_batch(buf_pool, max);

buf/buf0lru.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ buf_flush_or_remove_page(
526526

527527
mutex_exit(block_mutex);
528528

529-
*must_restart = TRUE;
529+
*must_restart = true;
530530
processed = false;
531531

532532
} else if (!flush) {

buf/buf0rea.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,9 +640,9 @@ buf_read_ahead_linear(
640640

641641
fail_count = 0;
642642

643-
for (i = low; i < high; i++) {
643+
prio_rw_lock_t* hash_lock;
644644

645-
prio_rw_lock_t* hash_lock;
645+
for (i = low; i < high; i++) {
646646

647647
bpage = buf_page_hash_get_s_locked(buf_pool, space, i,
648648
&hash_lock);
@@ -691,7 +691,7 @@ buf_read_ahead_linear(
691691
/* If we got this far, we know that enough pages in the area have
692692
been accessed in the right order: linear read-ahead can be sensible */
693693

694-
bpage = buf_page_hash_get(buf_pool, space, offset);
694+
bpage = buf_page_hash_get_s_locked(buf_pool, space, offset, &hash_lock);
695695

696696
if (bpage == NULL) {
697697

@@ -719,6 +719,8 @@ buf_read_ahead_linear(
719719
pred_offset = fil_page_get_prev(frame);
720720
succ_offset = fil_page_get_next(frame);
721721

722+
rw_lock_s_unlock(hash_lock);
723+
722724
if ((offset == low) && (succ_offset == offset + 1)) {
723725

724726
/* This is ok, we can continue */

handler/ha_innodb.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ static PSI_mutex_info all_innodb_mutexes[] = {
340340
# ifndef PFS_SKIP_BUFFER_MUTEX_RWLOCK
341341
{&buffer_block_mutex_key, "buffer_block_mutex", 0},
342342
# endif /* !PFS_SKIP_BUFFER_MUTEX_RWLOCK */
343-
{&buf_pool_mutex_key, "buf_pool_mutex", 0},
344343
{&buf_pool_zip_mutex_key, "buf_pool_zip_mutex", 0},
345344
{&buf_pool_LRU_list_mutex_key, "buf_pool_LRU_list_mutex", 0},
346345
{&buf_pool_free_list_mutex_key, "buf_pool_free_list_mutex", 0},

handler/i_s.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5279,11 +5279,6 @@ i_s_innodb_fill_buffer_pool(
52795279
info_buffer = (buf_page_info_t*) mem_heap_zalloc(
52805280
heap, mem_size);
52815281

5282-
/* Obtain appropriate mutexes. Since this is diagnostic
5283-
buffer pool info printout, we are not required to
5284-
preserve the overall consistency, so we can
5285-
release mutex periodically */
5286-
52875282
/* GO through each block in the chunk */
52885283
for (n_blocks = num_to_process; n_blocks--; block++) {
52895284
i_s_innodb_buffer_page_get_info(

include/buf0flu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ buf_flush_init_for_writing(
7878
# if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
7979
/********************************************************************//**
8080
Writes a flushable page asynchronously from the buffer pool to a file.
81-
NOTE: block->mutex must be held upon entering this function, and they will be
82-
released by this function after flushing. This is loosely based on
81+
NOTE: block and LRU list mutexes must be held upon entering this function, and
82+
they will be released by this function after flushing. This is loosely based on
8383
buf_flush_batch() and buf_flush_page().
8484
@return TRUE if the page was flushed and the mutexes released */
8585
UNIV_INTERN

include/sync0sync.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ instrumentation due to their large number of instances. */
7171
/* Key defines to register InnoDB mutexes with performance schema */
7272
extern mysql_pfs_key_t autoinc_mutex_key;
7373
extern mysql_pfs_key_t buffer_block_mutex_key;
74-
extern mysql_pfs_key_t buf_pool_mutex_key;
7574
extern mysql_pfs_key_t buf_pool_zip_mutex_key;
7675
extern mysql_pfs_key_t buf_pool_LRU_list_mutex_key;
7776
extern mysql_pfs_key_t buf_pool_free_list_mutex_key;

include/univ.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Created 1/20/1994 Heikki Tuuri
4747
#define INNODB_VERSION_BUGFIX MYSQL_VERSION_PATCH
4848

4949
#ifndef PERCONA_INNODB_VERSION
50-
#define PERCONA_INNODB_VERSION 71.0
50+
#define PERCONA_INNODB_VERSION 72.0
5151
#endif
5252

5353
/* Enable UNIV_LOG_ARCHIVE in XtraDB */

srv/srv0start.cc

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,19 @@ UNIV_INTERN enum srv_shutdown_state srv_shutdown_state = SRV_SHUTDOWN_NONE;
128128
static os_file_t files[1000];
129129

130130
/** io_handler_thread parameters for thread identification */
131-
static ulint n[SRV_MAX_N_IO_THREADS + 6];
132-
/** io_handler_thread identifiers, 32 is the maximum number of purge threads */
133-
static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 6
131+
static ulint n[SRV_MAX_N_IO_THREADS];
132+
/** io_handler_thread identifiers, 32 is the maximum number of purge threads.
133+
The extra elements at the end are allocated as follows:
134+
SRV_MAX_N_IO_THREADS + 1: srv_master_thread
135+
SRV_MAX_N_IO_THREADS + 2: lock_wait_timeout_thread
136+
SRV_MAX_N_IO_THREADS + 3: srv_error_monitor_thread
137+
SRV_MAX_N_IO_THREADS + 4: srv_monitor_thread
138+
SRV_MAX_N_IO_THREADS + 5: srv_redo_log_follow_thread
139+
SRV_MAX_N_IO_THREADS + 6: srv_purge_coordinator_thread
140+
SRV_MAX_N_IO_THREADS + 7: srv_worker_thread
141+
...
142+
SRV_MAX_N_IO_THREADS + 7 + srv_n_purge_threads - 1: srv_worker_thread */
143+
static os_thread_id_t thread_ids[SRV_MAX_N_IO_THREADS + 7
134144
+ SRV_MAX_N_PURGE_THREADS];
135145

136146
/** We use this mutex to test the return value of pthread_mutex_trylock
@@ -1842,6 +1852,7 @@ innobase_start_or_create_for_mysql(void)
18421852
+ 1 /* srv_error_monitor_thread */
18431853
+ 1 /* srv_monitor_thread */
18441854
+ 1 /* srv_master_thread */
1855+
+ 1 /* srv_redo_log_follow_thread */
18451856
+ 1 /* srv_purge_coordinator_thread */
18461857
+ 1 /* buf_dump_thread */
18471858
+ 1 /* dict_stats_thread */
@@ -2729,16 +2740,16 @@ innobase_start_or_create_for_mysql(void)
27292740

27302741
os_thread_create(
27312742
srv_purge_coordinator_thread,
2732-
NULL, thread_ids + 5 + SRV_MAX_N_IO_THREADS);
2743+
NULL, thread_ids + 6 + SRV_MAX_N_IO_THREADS);
27332744

27342745
ut_a(UT_ARR_SIZE(thread_ids)
2735-
> 5 + srv_n_purge_threads + SRV_MAX_N_IO_THREADS);
2746+
> 6 + srv_n_purge_threads + SRV_MAX_N_IO_THREADS);
27362747

27372748
/* We've already created the purge coordinator thread above. */
27382749
for (i = 1; i < srv_n_purge_threads; ++i) {
27392750
os_thread_create(
27402751
srv_worker_thread, NULL,
2741-
thread_ids + 5 + i + SRV_MAX_N_IO_THREADS);
2752+
thread_ids + 6 + i + SRV_MAX_N_IO_THREADS);
27422753
}
27432754

27442755
srv_start_wait_for_purge_to_start();

0 commit comments

Comments
 (0)