rculfhash: Change lazy shrink strategy
authorLai Jiangshan <laijs@cn.fujitsu.com>
Wed, 2 Nov 2011 15:31:14 +0000 (11:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 2 Nov 2011 15:31:14 +0000 (11:31 -0400)
commit89bb121d8cea974a8b6927499d917620236b7fee
treeb844ce4c5a2ef3787bb28814b353d38d5662aed1
parentf1f119ee8b4859cff4bbe8c5e1b6b241d5c13a8b
rculfhash: Change lazy shrink strategy

We can aggressively grow a ht,
but we should conservatively shrink a ht.

When we try to shrink the ht after a deletion,
but if a growing is required after it, we should
stop this shrink.

But it is more complicated to implement it, so we use more
conservative strategy to shrink a ht to gain simple code:

We stop to (lazy) shrink when we found growing is
in progress.

[ Edit by Mathieu Desnoyers: Add documentation, cleanup. ]

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c
This page took 0.024992 seconds and 4 git commands to generate.