tests: split in check, regtest and bench targets Allow make check to run without requiring build machines to use hours of CPU time. make check: short unit tests make regtest: long regression tests make bench: long benchmarks Fixes #611 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rcutorture: make goflag volatile Even cmm_barrier may not be enough as a compiler barrier in the presence of static variables, and cmm_mb would not be either! The compiler assumes that calling a function does not clobber static variables if it can prove that they do not escape (which also implies the correct phase of the moon). Rather than sprinkling the code with compiler barriers, I am taking the easy way out and declaring the variable volatile. Without this patch, rcutorture_qsbr never finishes for me (GCC 4.5.0). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
call_rcu: use cpu affinity for per-cpu call_rcu threads I played a bit with the call_rcu() implementation alongside with my rbtree tests, and noticed the following: If I use per-cpu call_rcu threads with URCU_CALL_RCU_RT flag, with one updater thread only for my rbtree (no reader), I get 38365 updates/s. If I add cpu affinity to these per-cpu call_rcu threads (I have prepared a patch that does this), it jumps to 54219 updates/s. So it looks like keeping per-cpu affinity for the call_rcu thread is a good thing. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Map symbols to allow multiple RCU flavors to be used in one binary Probably need similar mapping for rcu_defer(). Definitely need backwards-compatibility mapping for programs compiled against old versions of the library. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add call_rcu() interface Adds call_rcu(), with RCU threads to invoke the callbacks. By default, there will be one such RCU thread per process, created the first time that call_rcu() is invoked. On systems supporting sched_getcpu(), it is possible to create one RCU thread per CPU by calling create_all_cpu_call_rcu_data(). This version includes feedback from Mathieu Desnoyers. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Rename all arch primitives with prefix caa_ This is the second patch for reducing namespace pollution. The caa_ prefix stands for Concurrent Architecture Abstraction. Again, suggested by Mathieu Desnoyers and Paul E. Mckenney. Every define, macro and function specific to the architecture abstraction of liburcu is modified with that prefix Signed-off-by: David Goulet <david.goulet@polymtl.ca> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Rename all memory primitives with prefix cmm_ In order to not pollute the userspace namespace for application using liburcu or any lib/apps linked with urcu, this patch if the first of three major refactor for naming convention. The cmm_ prefix is a short name for Concurrent Memory Model and was suggested by Mathieu Desnoyers and Paul E. Mckenney. Every memory primitives such as mb, wmb, rmb, and so on are renamed. Signed-off-by: David Goulet <david.goulet@polymtl.ca> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cleanup headers * atomic_ -> uatomic (to remove namespace clash with libkcompat) * moved arch.h, compiler.h, arch_uatomic.h to /usr/include/urcu/ to make sure we do not pollute system headers. Also add call_rcu() documentation to README. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>