From 65e8e72998f82cca2e86fd108f625905f988b515 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 6 Jul 2011 10:50:09 -0400 Subject: [PATCH] Update resize thresholds Signed-off-by: Mathieu Desnoyers --- rculfhash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rculfhash.c b/rculfhash.c index f09f613..534a2f8 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -46,8 +46,8 @@ #define dbg_printf(args...) #endif -#define CHAIN_LEN_TARGET 4 -#define CHAIN_LEN_RESIZE_THRESHOLD 16 +#define CHAIN_LEN_TARGET 1 +#define CHAIN_LEN_RESIZE_THRESHOLD 2 #ifndef max #define max(a, b) ((a) > (b) ? (a) : (b)) @@ -169,7 +169,7 @@ void check_resize(struct rcu_ht *ht, struct rcu_table *t, { if (chain_len >= CHAIN_LEN_RESIZE_THRESHOLD) ht_resize_lazy(ht, t, - log2_u32(chain_len - CHAIN_LEN_TARGET)); + log2_u32(chain_len - CHAIN_LEN_TARGET - 1)); } static -- 2.34.1