From 63f963700f0c89292092047ec2423e8d8ab1f955 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 26 Nov 2009 06:37:30 +0000 Subject: Changed rbthash_table_init() to take a mem-pool argument. Changes in libglusterfs/rbthash: rbthash_table_init() now takes a mem-pool argument. The mem-pool argument would be mutually exclusive to expected_entries. If expected_entries is provided, mem-pool would be ignored and vice-versa. Changes in io-cache: 1) Moved rbthash creation to readv. 2) rbthash makes use of 1 rbt instead of 4096 3) A global mem-pool is being used in place of a mem-pool per rbt. Signed-off-by: Vijay Bellur Signed-off-by: Anand V. Avati BUG: 335 (Io-cache optimization) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=335 --- xlators/performance/stat-prefetch/src/stat-prefetch.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'xlators/performance/stat-prefetch/src') diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c index 29d915c1a3d..566dd18094f 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.c +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c @@ -171,10 +171,12 @@ sp_cache_init (void) cache = CALLOC (1, sizeof (*cache)); if (cache) { - cache->table = rbthash_table_init (GF_SP_CACHE_BUCKETS, - sp_hashfn, - free, - GF_SP_CACHE_ENTRIES_EXPECTED); + cache->table = + rbthash_table_init (GF_SP_CACHE_BUCKETS, + sp_hashfn, + free, + GF_SP_CACHE_ENTRIES_EXPECTED, + NULL); if (cache->table == NULL) { FREE (cache); cache = NULL; @@ -216,7 +218,8 @@ sp_cache_remove_entry (sp_cache_t *cache, char *name, char remove_all) cache->table = rbthash_table_init (GF_SP_CACHE_BUCKETS, sp_hashfn, free, - GF_SP_CACHE_ENTRIES_EXPECTED); + GF_SP_CACHE_ENTRIES_EXPECTED, + NULL); if (cache->table == NULL) { cache->table = table; } else { -- cgit