From bdf002d9635e9be3fc853dd4ce1f3905dfa10569 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 17 May 2003 16:23:46 +0300 Subject: 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 innobase/buf/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 --- innobase/buf/buf0buf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'innobase/buf/buf0buf.c') 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 */ -- cgit v1.2.1