summaryrefslogtreecommitdiff
path: root/innobase/buf
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2003-05-17 16:23:46 +0300
committerheikki@hundin.mysql.fi <>2003-05-17 16:23:46 +0300
commit526bb7dc7b750ad9dd4273d48eab223770efe73b (patch)
tree0050cbf0b223f0cc794e1e0e2debc4f1ec526b94 /innobase/buf
parent5359d046083ddf0318c725780b61baa1a1aaed62 (diff)
downloadmariadb-git-526bb7dc7b750ad9dd4273d48eab223770efe73b.tar.gz
buf0buf.c:
When calculating the buf pool dirty pages ratio, add also free pages to the LRU list length: no need to active flushing if there are lots of free pages in the buffer pool
Diffstat (limited to 'innobase/buf')
-rw-r--r--innobase/buf/buf0buf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/innobase/buf/buf0buf.c b/innobase/buf/buf0buf.c
index c793c11f29e..e000d862403 100644
--- a/innobase/buf/buf0buf.c
+++ b/innobase/buf/buf0buf.c
@@ -1845,7 +1845,8 @@ buf_get_modified_ratio_pct(void)
mutex_enter(&(buf_pool->mutex));
ratio = (100 * UT_LIST_GET_LEN(buf_pool->flush_list))
- / (1 + UT_LIST_GET_LEN(buf_pool->LRU));
+ / (1 + UT_LIST_GET_LEN(buf_pool->LRU)
+ + UT_LIST_GET_LEN(buf_pool->free));
/* 1 + is there to avoid division by zero */