projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rculfhash: use threshold and target
[urcu.git]
/
rculfhash.c
diff --git
a/rculfhash.c
b/rculfhash.c
index 497a9eacdebd764771d1e6e2e88a95c019f83724..450b286385ab2e00db0116e78326dbb6d0c74521 100644
(file)
--- a/
rculfhash.c
+++ b/
rculfhash.c
@@
-46,7
+46,8
@@
#define dbg_printf(args...)
#endif
#define dbg_printf(args...)
#endif
-#define BUCKET_SIZE_RESIZE_THRESHOLD 4
+#define CHAIN_LEN_TARGET 4
+#define CHAIN_LEN_RESIZE_THRESHOLD 16
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
@@
-165,8
+166,9
@@
static
void check_resize(struct rcu_ht *ht, struct rcu_table *t,
uint32_t chain_len)
{
void check_resize(struct rcu_ht *ht, struct rcu_table *t,
uint32_t chain_len)
{
- if (chain_len >= BUCKET_SIZE_RESIZE_THRESHOLD)
- ht_resize_lazy(ht, t, log2_u32(chain_len));
+ if (chain_len >= CHAIN_LEN_RESIZE_THRESHOLD)
+ ht_resize_lazy(ht, t,
+ log2_u32(chain_len - CHAIN_LEN_TARGET));
}
static
}
static
This page took
0.022207 seconds
and
4
git commands to generate.