Commit 484de489 authored by marko's avatar marko

branches/zip: buf_page_get_gen(): Reduce mutex holding time by adjusting

buf_pool->n_pend_unzip while only holding buf_pool_mutex.
parent 99c57a52
...@@ -2182,10 +2182,10 @@ buf_page_get_gen( ...@@ -2182,10 +2182,10 @@ buf_page_get_gen(
block->page.buf_fix_count = 1; block->page.buf_fix_count = 1;
buf_block_set_io_fix(block, BUF_IO_READ); buf_block_set_io_fix(block, BUF_IO_READ);
buf_pool->n_pend_unzip++;
rw_lock_x_lock(&block->lock); rw_lock_x_lock(&block->lock);
mutex_exit(&block->mutex); mutex_exit(&block->mutex);
mutex_exit(&buf_pool_zip_mutex); mutex_exit(&buf_pool_zip_mutex);
buf_pool->n_pend_unzip++;
buf_buddy_free(bpage, sizeof *bpage); buf_buddy_free(bpage, sizeof *bpage);
...@@ -2203,10 +2203,10 @@ buf_page_get_gen( ...@@ -2203,10 +2203,10 @@ buf_page_get_gen(
/* Unfix and unlatch the block. */ /* Unfix and unlatch the block. */
buf_pool_mutex_enter(); buf_pool_mutex_enter();
mutex_enter(&block->mutex); mutex_enter(&block->mutex);
buf_pool->n_pend_unzip--;
block->page.buf_fix_count--; block->page.buf_fix_count--;
buf_block_set_io_fix(block, BUF_IO_NONE); buf_block_set_io_fix(block, BUF_IO_NONE);
mutex_exit(&block->mutex); mutex_exit(&block->mutex);
buf_pool->n_pend_unzip--;
rw_lock_x_unlock(&block->lock); rw_lock_x_unlock(&block->lock);
if (UNIV_UNLIKELY(!success)) { if (UNIV_UNLIKELY(!success)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment