Update resize thresholds
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Jul 2011 14:50:09 +0000 (10:50 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 6 Jul 2011 14:50:09 +0000 (10:50 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c

index f09f6132aa458103a216be214e011acc5586a410..534a2f8764ba8473ed896aa48a6fbc47690da4cf 100644 (file)
@@ -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
This page took 0.030403 seconds and 4 git commands to generate.