Mathieu Desnoyers [Wed, 21 Sep 2011 05:11:05 +0000 (01:11 -0400)]
rculfhash: node alignment is back to 4 bytes
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 21 Sep 2011 04:45:11 +0000 (00:45 -0400)]
rculfhash: remove now unneeded gc flag (combine with removed)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 21 Sep 2011 04:40:38 +0000 (00:40 -0400)]
rculfhash: implement lock-free replacement
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 21 Sep 2011 03:05:08 +0000 (23:05 -0400)]
rculfhash: support replacement operation
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 20 Sep 2011 23:34:49 +0000 (19:34 -0400)]
rculfhash: API rename: remove -> del
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 20 Sep 2011 21:50:58 +0000 (17:50 -0400)]
rculfhash: spawn only number of threads required for resize
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 20 Sep 2011 20:46:22 +0000 (16:46 -0400)]
rculfhash: parallelize resize
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 19 Sep 2011 20:22:49 +0000 (16:22 -0400)]
rculfhash: document flags
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 19 Sep 2011 20:12:43 +0000 (16:12 -0400)]
rculfhash: comment file inclusion order
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 19 Sep 2011 20:07:18 +0000 (16:07 -0400)]
rculfhash: simplify lfht_new API with inline wrapper
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 19 Sep 2011 17:27:08 +0000 (13:27 -0400)]
rculfhash: add TODO for resize worker threads
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 19 Sep 2011 16:57:12 +0000 (12:57 -0400)]
rculfhash: Remove leftover assertions
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 19 Sep 2011 16:56:04 +0000 (12:56 -0400)]
rculfhash: merge table hash and link stages into populate
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 19 Sep 2011 16:49:23 +0000 (12:49 -0400)]
Merge branch 'urcu/ht-shrink-help' into urcu/ht-shrink
Mathieu Desnoyers [Mon, 19 Sep 2011 16:45:26 +0000 (12:45 -0400)]
rculfhash: remove helper scheme
There is a trade-off to consider here:
- The helper scheme would require the helpers to allocate the memory for
dummy nodes themself for correctness (the current implementation is
buggy because lookups consider an half-linked dummy node to be ready for
use), which does not work with a cache-efficient per-level array of
dummy nodes.
- We want cache-efficiency, so we want to keep the per-level array
allocation.
Therefore, letting insert/removal/lookups help expand is not the way to
go here. This patch removes the helping scheme.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Thu, 15 Sep 2011 15:24:03 +0000 (11:24 -0400)]
avoid leaking crdp for failed path
[ Comment: now that set_cpu_call_rcu_data() is not racy and detects
overwrites, we can effectively trust its return value and free the
crdp if already set. ]
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Thu, 15 Sep 2011 15:22:03 +0000 (11:22 -0400)]
Return -EEXIST when the old cpu call_rcu_data has not been removed
To make it matches the comments.
It is the caller's responsibility to use
set_cpu_call_rcu_data(cpu, NULL) to remove the CPU's
call_rcu_data structure and dispose it.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Thu, 15 Sep 2011 15:20:29 +0000 (11:20 -0400)]
protect writing to per_cpu_call_rcu_data[*]
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Thu, 15 Sep 2011 15:19:12 +0000 (11:19 -0400)]
wake up default call_rcu thread after we move the leftover callbacks
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Thu, 15 Sep 2011 15:17:41 +0000 (11:17 -0400)]
avoid memory leak in call_rcu_data_free()
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Thu, 15 Sep 2011 15:14:43 +0000 (11:14 -0400)]
urcu call_rcu: fix use after free()
call_rcu_after_fork_child() needs to use cds_list_for_each_entry_safe to
safely iterate on the list as its item is being freed.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Thu, 15 Sep 2011 15:10:31 +0000 (11:10 -0400)]
use get_cpu_call_rcu_data() for get_call_rcu_data()
[ Impact: refactor duplicated code ]
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Thu, 15 Sep 2011 15:01:38 +0000 (11:01 -0400)]
init maxcpus before use
[ Edit:
Covers the per-cpu call_rcu data setup (not all_cpus helper, which is
why we did not trigger it in our tests. ]
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Thu, 15 Sep 2011 14:56:56 +0000 (10:56 -0400)]
call_rcu implementation: add missing static
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Thu, 15 Sep 2011 14:56:56 +0000 (10:56 -0400)]
call_rcu implementation: add missing static
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 15 Sep 2011 14:04:30 +0000 (10:04 -0400)]
Document QSBR interaction with mutexes
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 15 Sep 2011 14:04:30 +0000 (10:04 -0400)]
Document QSBR interaction with mutexes
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 15 Sep 2011 10:41:46 +0000 (06:41 -0400)]
rculfhash test: exit upon failure
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 15 Sep 2011 10:29:31 +0000 (06:29 -0400)]
rculfhash: fix add_unique node counting
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 14 Sep 2011 21:24:00 +0000 (17:24 -0400)]
rculfhash test: cast rand_r return value directly
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 14 Sep 2011 21:19:07 +0000 (17:19 -0400)]
rculfhash test: add verbosity
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 14 Sep 2011 18:27:48 +0000 (14:27 -0400)]
rculfhash test: allow different size for lookup, write, init
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 14 Sep 2011 17:36:12 +0000 (13:36 -0400)]
qsbr vs call_rcu : remove exit assertion
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 14 Sep 2011 17:17:16 +0000 (13:17 -0400)]
rculfhash: validate lookups
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 14 Sep 2011 17:04:35 +0000 (13:04 -0400)]
rculfhash test: add pool offsets
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 14 Sep 2011 02:40:51 +0000 (22:40 -0400)]
rculfhash: with resize stop and helpers, min size can now be 1
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 14 Sep 2011 02:27:15 +0000 (22:27 -0400)]
rculfhash: help scheme: fix end node, insertion, and lookups
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 14 Sep 2011 00:33:15 +0000 (20:33 -0400)]
rculfhash: break in-progress resize when target size change (between levels)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 14 Sep 2011 00:33:15 +0000 (20:33 -0400)]
rculfhash: break in-progress resize when target size change (between levels)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 13 Sep 2011 23:16:28 +0000 (19:16 -0400)]
rculfhash: make add/removal help expand
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 13 Sep 2011 22:32:35 +0000 (18:32 -0400)]
rculfhash: comment shrink operation
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 13 Sep 2011 22:18:52 +0000 (18:18 -0400)]
rculfhash: remove verified TODOs
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 13 Sep 2011 22:12:38 +0000 (18:12 -0400)]
rculfhash: put thread offline before taking mutex (fix G.P. deadlock)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 13 Sep 2011 21:34:19 +0000 (17:34 -0400)]
Merge branch 'master' into urcu/ht-shrink-help
Conflicts:
urcu-qsbr.c
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 13 Sep 2011 21:00:08 +0000 (17:00 -0400)]
urcu-pointer: implement URCU_FORCE_CAST for C++ compatibility of urcu-pointer.h
We need to be careful with those, so we do not break aliasing. Our
use-case is to cast back and forth between the same type and a void *
(or void **) type when we pass pointers to C functions. As we cast back
to the same type when the pointer is returned from the function,
aliasing should still work.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 13 Sep 2011 18:44:25 +0000 (14:44 -0400)]
rculfhash: use single init-time allocation for order table
This simplifies management of hash table resizes. Thanks to Josh
Triplett for suggesting this.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Paolo Bonzini [Tue, 13 Sep 2011 17:49:28 +0000 (13:49 -0400)]
urcu-qsbr: use rcu_thread_offline/rcu_thread_online instead of inlining them
* Mathieu Desnoyers wrote:
> Just to let you know that I pushed two updates into urcu: one fixes a
> grace period hang caused by a missing wakeup in the synchronize_rcu
> QSBR code. This appears to hit us due to the more fine-grained wakeup
> code brought by Paolo. The wakeup was really missing from the
> synchronize_rcu code (so Paolo's code just triggered an existing
> problem). I thought it would be good to let you know the effect: grace
> periods are delayed forever. This problem never appeared in a release
> (I caught it before).
Good catch. Why not use rcu_thread_offline/online in synchronize_rcu,
instead of touching rcu_reader.ctr directly? I had this in my QEMU
branch but hadn't posted yet because it was meant as a cleanup only.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 06:45:59 +0000 (23:45 -0700)]
Pair all_cpu call_rcu create with free
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 06:39:03 +0000 (23:39 -0700)]
rculfhash test: add missing call_rcu per-cpu worker threads teardown
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 06:29:54 +0000 (23:29 -0700)]
rculfhash: disable poison and remove debugging code
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 05:02:58 +0000 (22:02 -0700)]
call_rcu: register work threads as rcu readers
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 06:03:09 +0000 (23:03 -0700)]
QSBR: add missing wakeups in synchronize_rcu code
synchronize_rcu go into offline mode during grace period. It duplicates
the rcu_thread_online/offline code, and therefore adding the required
wake_up_gp() is required there too.
Failure to do so leads to grace period hangs.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 06:03:09 +0000 (23:03 -0700)]
QSBR: add missing wakeups in synchronize_rcu code
synchronize_rcu go into offline mode during grace period. It duplicates
the rcu_thread_online/offline code, and therefore adding the required
wake_up_gp() is required there too.
Failure to do so leads to grace period hangs.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 05:09:55 +0000 (22:09 -0700)]
rculfhash: hold rcu read-side lock in resize
We need to hold the RCU read-side lock in resize to protect against ABA
caused by re-use of nodes after going through the memory allocator
through a call_rcu performed on another CPU.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 05:02:58 +0000 (22:02 -0700)]
call_rcu: register work threads as rcu readers
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 03:53:30 +0000 (20:53 -0700)]
rculfhash: add list iteration tracer in gc
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 02:58:11 +0000 (19:58 -0700)]
rculfhash: poison memory before free (for testing)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 02:33:56 +0000 (19:33 -0700)]
rculfhash: reinstate i - 1 for shrink
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 01:32:45 +0000 (18:32 -0700)]
rculfhash: add assertion in path compression
Detects incorrect usage of path compression.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 01:14:59 +0000 (18:14 -0700)]
rculfhash: fix fini_table for size 1
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Sep 2011 01:11:56 +0000 (18:11 -0700)]
rculfhash: Fix off-by-one in fini_table
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 10 Sep 2011 23:52:53 +0000 (16:52 -0700)]
rculfhash: add asserts and comments
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Paolo Bonzini [Sat, 10 Sep 2011 19:29:56 +0000 (12:29 -0700)]
cmm: do not generate code for smp_rmb/smp_wmb on x86_64
We can assume, on x86, that no accesses to write-combining memory occur,
and also that there are no non-temporal load/stores (people would
presumably write those with assembly or intrinsics and put appropriate
lfence/sfence manually). In this case rmb and wmb are no-ops on x86.
according to the updated x86 memory models:
INTEL CORPORATION. Intel 64 Architecture Memory Ordering White Paper,
2007.
http://developer.intel.com/products/processor/manuals/318147.pdf
ADVANCED MICRO DEVICES. AMD x86-64 Architecture Programmer’s Manual
Volume 2: System Programming, 2007.
Paul E. McKenney. Memory Ordering in Modern Microprocessors
www.rdrop.com/users/paulmck/scalability/paper/ordering.2007.09.19a.pdf
x86 does not reorder loads vs loads, and stores vs stores when using
normal memory accesses, with the notable exceptions of Pentium Pro
(reorders reads) and WinChip (reorders writes). Therefore, it is safe
not to emit fence instructions for x86_64 cmm_smp_rmb()/cmm_smp_wmb(),
but we leave the memory fences in place for x86_32 for those two
special-cases.
Define cmm_smp_rmb and cmm_smp_wmb to be the "common" operations that
do not require fence instruction, while leaving cmm_rmb and cmm_wmb in
place for more sophisticated uses.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Paolo Bonzini [Sat, 10 Sep 2011 19:26:19 +0000 (12:26 -0700)]
cmm: let per-arch files provide cmm_smp_* barriers
x86 instructions lfence and sfence are rarely needed, thus we want
the cmm_smp_rmb/cmm_smp_wmb macros to be simple compiler barriers.
So, let the per-arch files override the default definitions in
arch/generic.h.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 9 Sep 2011 21:43:58 +0000 (17:43 -0400)]
rculfhash test: -A option for auto resize
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 9 Sep 2011 21:42:01 +0000 (17:42 -0400)]
rculfhash: Make auto resize selectable with flag
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tulio Magno Quites Machado Filho [Fri, 9 Sep 2011 05:37:11 +0000 (22:37 -0700)]
Optimize caa_get_cycles() for PowerPC64
Make caa_get_cycles() read from the Time Base register with only 1
instruction.
[ Edit by Mathieu Desnoyers: coding style update ]
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Mathieu Desnoyers [Thu, 8 Sep 2011 19:04:36 +0000 (12:04 -0700)]
rculfhash: update ascii art
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 8 Sep 2011 17:44:19 +0000 (13:44 -0400)]
rculfhash: set minimum table size, add todo about helping resize
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 8 Sep 2011 16:16:19 +0000 (09:16 -0700)]
rculfhash: fix 0 order lookup (special-case)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 8 Sep 2011 05:16:42 +0000 (22:16 -0700)]
rculfhash: simplify dummy node removal
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 8 Sep 2011 00:15:20 +0000 (17:15 -0700)]
rculfhash: deal with resize to size 1 corner-case
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 7 Sep 2011 22:50:05 +0000 (15:50 -0700)]
rculfhash: allow shrink
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 7 Sep 2011 16:44:42 +0000 (09:44 -0700)]
test rculfhash: add/remove/random support (with SIGUSR1)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 7 Sep 2011 16:18:26 +0000 (09:18 -0700)]
rculfhash: set size instead of max for per-cpu count scheme
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 7 Sep 2011 15:58:33 +0000 (08:58 -0700)]
rculfhash: tweak resize thresholds
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 7 Sep 2011 15:48:29 +0000 (08:48 -0700)]
rculfhash: tweak per-cpu counter resize with thresholds
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 6 Sep 2011 19:33:34 +0000 (12:33 -0700)]
rcuhash: lazy per-cpu counters, fix resize target update
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 6 Sep 2011 17:44:30 +0000 (13:44 -0400)]
rculfhash: count nodes (per-cpu) as expand criterion
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 5 Sep 2011 01:25:21 +0000 (21:25 -0400)]
lfq/lfs tests: use call_rcu
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 5 Sep 2011 00:11:01 +0000 (20:11 -0400)]
Revert "Add cds_list_empty"
This reverts commit
4b7cab77f3c1c03f021cb0f7e8d150eed3f948e9.
(did duplicate cds_list_empty)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 5 Sep 2011 00:07:41 +0000 (20:07 -0400)]
Add cds_list_empty
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 4 Sep 2011 23:48:20 +0000 (19:48 -0400)]
list: Add cds_list_first_entry
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 20:23:24 +0000 (16:23 -0400)]
rculfhash test: Check random pool size
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 20:05:12 +0000 (16:05 -0400)]
rculfhash: Add initial hash population
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 19:24:25 +0000 (15:24 -0400)]
rculfhash: benchmark QSBR flavor
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 19:04:39 +0000 (15:04 -0400)]
rculfhash test: print number of add fail (uniquify matches)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 18:33:06 +0000 (14:33 -0400)]
rculfhash: power power of two check should allow 0
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 16:20:31 +0000 (12:20 -0400)]
rculfhash: implement cds_lfht_next
Useful for walk traversal of all nodes sharing the same key (lookup +
next until NULL is returned).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 15:42:44 +0000 (11:42 -0400)]
rculfhash: Update API documentation
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 15:42:30 +0000 (11:42 -0400)]
rculfhash: Check that init size is power of 2
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 15:37:47 +0000 (11:37 -0400)]
Use cds_lfht namespace for lock-free hash table
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 15:16:02 +0000 (11:16 -0400)]
RCU hash table API documentation
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 14:48:44 +0000 (10:48 -0400)]
Merge branch 'master' into urcu/ht
Conflicts:
Makefile.am
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 14:07:41 +0000 (10:07 -0400)]
rculfstack/queue: define _LGPL_SOURCE around static header include
... so the urcu-pointer header takes the LGPL version of rcu_dereference
and friends.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 13:49:07 +0000 (09:49 -0400)]
Revert "Create per RCU flavor CDS libraries"
This reverts commit
d4b99c015229978810319cfd42e1c9763772fad8.
Minor change (not visible to end-users): this commit introduces a
liburcu-common.so to hold wfqueue, wfstack and futex fall-back code.
This .so is used by all URCU flavors, as well as liburcu-cds.so.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 13:15:14 +0000 (09:15 -0400)]
Revert "CDS API: removal of rcu_read lock/unlock dep, removal of call_rcu argument from init"
This reverts commit
7618919ae496bda84a2efa4f2ad0abe569892a9e.
Rationale:
I thought about it some more, and had discussions with various people,
and there are a few reasons to go for a scheme where rcu read lock
should be taken by the caller, and to pass call_rcu as a parameter to
the data structure init function:
A) The advantage, as Paul E. McKenney pointed out, is that one single .so
is enough to support all RCU flavors. Very convenient for external data
structure containers.
B) It clearly documents where rcu read-side locks are needed, so the user
keep control and in-depth understanding of their read-side locks.
C) When multiple API functions that require RCU read-side lock to be
held (sometimes even the same lock) throughout a sequence of API
calls, we have no choice but to let the caller hold the read-side
lock.
D) Due to support of multiple nesting of rcu read-side lock, any
"improvement" we could get by releasing the read-side lock in
retry loops would vanish in the cases where we are called within
nested C.S..
E) If a library uses synchronize_rcu, this should be clearly documented,
and even frowned upon, because this involves important limitations on
the design of the caller, and important performance hit. There are
usually ways to reach the same result through use of call_rcu, which
should really be used thoroughout these libraries.
F) It clearly documents when a data structure needs to use call_rcu
internally.
G) Some very early benchmark results show that there is indeed not
much performance gain to achieve by inlining call_rcu, even if it is
a version with a cache for the "call_rcu structure" lookup
(per-cpu/per-thread/global). So passing it as a parameter to
the data structure init function should be fine, even in cases
where it is called very often.
H) For use-cases where applications would like to use more than one
RCU flavor concurrently (which is now supported), leaving management
of RCU read-side C.S. to the reader allows the application to take
more than one RCU read-side lock across API calls. It also lets the
application specify its own call_rcu function that could handle more
than one RCU flavor.
So for all these reasons, I reverting back to the API we have in our
last release (0.6.4).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 3 Sep 2011 12:37:22 +0000 (08:37 -0400)]
Add __rcu annotation (unimplemented)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 1 Sep 2011 20:11:14 +0000 (16:11 -0400)]
Fix incorrect fsf address in header files
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 1 Sep 2011 13:31:55 +0000 (09:31 -0400)]
wfstack: push returns prior stack emptiness state
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.045248 seconds and 4 git commands to generate.