summaryrefslogtreecommitdiff
path: root/innobase/buf/buf0buf.c
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-01-09 00:10:36 +0200
committerunknown <heikki@hundin.mysql.fi>2003-01-09 00:10:36 +0200
commit106d4fe2fb051fce3b2ad553868fe8f69b078444 (patch)
treec8feba19d059f3cfb680b610d1d63f5c1f6764c6 /innobase/buf/buf0buf.c
parent3f323f46da209727fd0e98a501eb5174554db8f4 (diff)
downloadmariadb-git-106d4fe2fb051fce3b2ad553868fe8f69b078444.tar.gz
srv0srv.c, mem0pool.c, mem0pool.h, buf0buf.h, buf0buf.c:
Make smaller buffer headers and the lock table; fix AWE high_end bug innobase/buf/buf0buf.c: Make smaller buffer headers and the lock table; fix AWE high_end bug innobase/include/buf0buf.h: Make smaller buffer headers and the lock table; fix AWE high_end bug innobase/include/mem0pool.h: Make smaller buffer headers and the lock table; fix AWE high_end bug innobase/mem/mem0pool.c: Make smaller buffer headers and the lock table; fix AWE high_end bug innobase/srv/srv0srv.c: Make smaller buffer headers and the lock table; fix AWE high_end bug
Diffstat (limited to 'innobase/buf/buf0buf.c')
-rw-r--r--innobase/buf/buf0buf.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c
index 58c4ca5271b..4c77a374210 100644
--- a/innobase/buf/buf0buf.c
+++ b/innobase/buf/buf0buf.c
@@ -385,9 +385,6 @@ buf_block_init(
rw_lock_create(&(block->lock));
ut_ad(rw_lock_validate(&(block->lock)));
-
- rw_lock_create(&(block->read_lock));
- rw_lock_set_level(&(block->read_lock), SYNC_NO_ORDER_CHECK);
#ifdef UNIV_SYNC_DEBUG
rw_lock_create(&(block->debug_latch));
@@ -484,7 +481,7 @@ buf_pool_init(
frame = ut_align(buf_pool->frame_mem, UNIV_PAGE_SIZE);
buf_pool->frame_zero = frame;
- buf_pool->high_end = frame + UNIV_PAGE_SIZE * curr_size;
+ buf_pool->high_end = frame + UNIV_PAGE_SIZE * n_frames;
if (srv_use_awe) {
/*----------------------------------------*/
@@ -1099,8 +1096,26 @@ loop:
} else if (rw_latch == RW_NO_LATCH) {
if (must_read) {
- rw_lock_x_lock(&(block->read_lock));
- rw_lock_x_unlock(&(block->read_lock));
+ /* Let us wait until the read operation
+ completes */
+
+ for (;;) {
+ mutex_enter(&(buf_pool->mutex));
+
+ if (block->io_fix == BUF_IO_READ) {
+
+ mutex_exit(&(buf_pool->mutex));
+
+ /* Sleep 20 milliseconds */
+
+ os_thread_sleep(20000);
+ } else {
+
+ mutex_exit(&(buf_pool->mutex));
+
+ break;
+ }
+ }
}
fix_type = MTR_MEMO_BUF_FIX;
@@ -1523,8 +1538,6 @@ buf_page_init_for_read(
is completed. The x-lock is cleared by the io-handler thread. */
rw_lock_x_lock_gen(&(block->lock), BUF_IO_READ);
-
- rw_lock_x_lock_gen(&(block->read_lock), BUF_IO_READ);
mutex_exit(&(buf_pool->mutex));
@@ -1747,9 +1760,7 @@ buf_page_io_complete(
buf_pool->n_pend_reads--;
buf_pool->n_pages_read++;
-
rw_lock_x_unlock_gen(&(block->lock), BUF_IO_READ);
- rw_lock_x_unlock_gen(&(block->read_lock), BUF_IO_READ);
if (buf_debug_prints) {
printf("Has read ");