From 315e0143f65da3485dcbcd2f6a3172a351618aec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 28 Nov 2019 05:53:08 +0100 Subject: Adding upstream version 1.19.0. Signed-off-by: Daniel Baumann --- database/engine/pagecache.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'database/engine/pagecache.c') diff --git a/database/engine/pagecache.c b/database/engine/pagecache.c index a419ba981..449138b4d 100644 --- a/database/engine/pagecache.c +++ b/database/engine/pagecache.c @@ -214,7 +214,7 @@ static void pg_cache_release_pages(struct rrdengine_instance *ctx, unsigned numb * This function returns the maximum number of pages allowed in the page cache. * The caller must hold the page cache lock. */ -static inline unsigned long pg_cache_hard_limit(struct rrdengine_instance *ctx) +unsigned long pg_cache_hard_limit(struct rrdengine_instance *ctx) { /* it's twice the number of producers since we pin 2 pages per producer */ return ctx->max_cache_pages + 2 * (unsigned long)ctx->stats.metric_API_producers; @@ -225,7 +225,7 @@ static inline unsigned long pg_cache_hard_limit(struct rrdengine_instance *ctx) * number of pages below that number. * The caller must hold the page cache lock. */ -static inline unsigned long pg_cache_soft_limit(struct rrdengine_instance *ctx) +unsigned long pg_cache_soft_limit(struct rrdengine_instance *ctx) { /* it's twice the number of producers since we pin 2 pages per producer */ return ctx->cache_pages_low_watermark + 2 * (unsigned long)ctx->stats.metric_API_producers; @@ -1029,14 +1029,14 @@ static void init_replaceQ(struct rrdengine_instance *ctx) assert(0 == uv_rwlock_init(&pg_cache->replaceQ.lock)); } -static void init_commited_page_index(struct rrdengine_instance *ctx) +static void init_committed_page_index(struct rrdengine_instance *ctx) { struct page_cache *pg_cache = &ctx->pg_cache; - pg_cache->commited_page_index.JudyL_array = (Pvoid_t) NULL; - assert(0 == uv_rwlock_init(&pg_cache->commited_page_index.lock)); - pg_cache->commited_page_index.latest_corr_id = 0; - pg_cache->commited_page_index.nr_commited_pages = 0; + pg_cache->committed_page_index.JudyL_array = (Pvoid_t) NULL; + assert(0 == uv_rwlock_init(&pg_cache->committed_page_index.lock)); + pg_cache->committed_page_index.latest_corr_id = 0; + pg_cache->committed_page_index.nr_committed_pages = 0; } void init_page_cache(struct rrdengine_instance *ctx) @@ -1049,7 +1049,7 @@ void init_page_cache(struct rrdengine_instance *ctx) init_metrics_index(ctx); init_replaceQ(ctx); - init_commited_page_index(ctx); + init_committed_page_index(ctx); } void free_page_cache(struct rrdengine_instance *ctx) @@ -1062,9 +1062,9 @@ void free_page_cache(struct rrdengine_instance *ctx) struct rrdeng_page_descr *descr; struct page_cache_descr *pg_cache_descr; - /* Free commited page index */ - ret_Judy = JudyLFreeArray(&pg_cache->commited_page_index.JudyL_array, PJE0); - assert(NULL == pg_cache->commited_page_index.JudyL_array); + /* Free committed page index */ + ret_Judy = JudyLFreeArray(&pg_cache->committed_page_index.JudyL_array, PJE0); + assert(NULL == pg_cache->committed_page_index.JudyL_array); bytes_freed += ret_Judy; for (page_index = pg_cache->metrics_index.last_page_index ; -- cgit v1.2.3