rculfhash: default mm type
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 4 Dec 2011 15:40:01 +0000 (10:40 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 4 Dec 2011 15:40:01 +0000 (10:40 -0500)
commitc1888f3a47cf8f7c213269888ce42d191de7e34a
tree9d7eaeabf1ad193d6d3a232e1aa0af76b73931cc
parentc0b8a8653e108be201ae8d1ca9918461c97d45ed
rculfhash: default mm type

In the original patch from Lai Jiangshan <laijs@cn.fujitsu.com>:

When I test backend with the following commands.
(my box is x86_64 with 4 cores/logic cpus)
**(test with Load factor = 100% only)**

./tests/test_urcu_hash 4 0 10 -B mmap -h $((1<<19)) -p $((1<<19))
./tests/test_urcu_hash 4 0 10 -B mmap -h $((1<<18)) -p $((1<<18))
./tests/test_urcu_hash 4 0 10 -B mmap -h $((1<<17)) -p $((1<<17))
./tests/test_urcu_hash 4 0 10 -B mmap -h $((1<<16)) -p $((1<<16))
                    4readers/no writer

It shows that mmap backend is about 6% better over order backend.
(It also shows that chunk backend is (worse than)/(the same as) order
backend for small/large min_nr_alloc_buckets. (use -m when test)).

Note:
"6%" and the google-perftools told us the bucket_at() is not the
critical bottleneck.

new strategy:
* infinite buckets size                  --> order mm
* otherwise if 64bits,
   with number of buckets <= (1 << 32)   --> mmap mm
* otherwise                              --> order mm

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c
urcu/rculfhash.h
This page took 0.025116 seconds and 4 git commands to generate.