diff options
Diffstat (limited to 'database/engine/pagecache.c')
-rw-r--r-- | database/engine/pagecache.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/database/engine/pagecache.c b/database/engine/pagecache.c index a419ba98..449138b4 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 ; |