Commit cc454ad4 authored by sunny's avatar sunny

Fix change missed as part of Bug# 15815. Use a function to check if a block

needs to be made younger.
parent dafdda2f
...@@ -903,8 +903,7 @@ buf_block_make_young( ...@@ -903,8 +903,7 @@ buf_block_make_young(
/* Note that we read freed_page_clock's without holding any mutex: /* Note that we read freed_page_clock's without holding any mutex:
this is allowed since the result is used only in heuristics */ this is allowed since the result is used only in heuristics */
if (buf_pool->freed_page_clock >= block->freed_page_clock if (buf_block_peek_if_too_old(block)) {
+ 1 + (buf_pool->curr_size / 4)) {
mutex_enter(&buf_pool->mutex); mutex_enter(&buf_pool->mutex);
/* There has been freeing activity in the LRU list: /* There has been freeing activity in the LRU list:
......
...@@ -28,7 +28,7 @@ buf_block_peek_if_too_old( ...@@ -28,7 +28,7 @@ buf_block_peek_if_too_old(
buf_block_t* block) /* in: block to make younger */ buf_block_t* block) /* in: block to make younger */
{ {
return(buf_pool->freed_page_clock >= block->freed_page_clock return(buf_pool->freed_page_clock >= block->freed_page_clock
+ 1 + (buf_pool->curr_size / 1024)); + 1 + (buf_pool->curr_size / 4));
} }
/************************************************************************* /*************************************************************************
......
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