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

needs to be made younger.
This commit is contained in:
sunny 2007-07-10 21:29:56 +00:00
parent d01057ba2d
commit baf0f21f23
2 changed files with 2 additions and 3 deletions

View file

@ -903,8 +903,7 @@ buf_block_make_young(
/* Note that we read freed_page_clock's without holding any mutex:
this is allowed since the result is used only in heuristics */
if (buf_pool->freed_page_clock >= block->freed_page_clock
+ 1 + (buf_pool->curr_size / 4)) {
if (buf_block_peek_if_too_old(block)) {
mutex_enter(&buf_pool->mutex);
/* There has been freeing activity in the LRU list:

View file

@ -28,7 +28,7 @@ buf_block_peek_if_too_old(
buf_block_t* block) /* in: block to make younger */
{
return(buf_pool->freed_page_clock >= block->freed_page_clock
+ 1 + (buf_pool->curr_size / 1024));
+ 1 + (buf_pool->curr_size / 4));
}
/*************************************************************************