From: Mathieu Desnoyers Date: Wed, 6 Jul 2011 14:50:09 +0000 (-0400) Subject: Update resize thresholds X-Git-Tag: v0.7.0~43^2~224 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=65e8e72998f82cca2e86fd108f625905f988b515;p=userspace-rcu.git Update resize thresholds Signed-off-by: Mathieu Desnoyers --- 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