urcu.git
13 years agoMerge branch 'master' into rbtree2
Mathieu Desnoyers [Thu, 9 Jun 2011 14:45:22 +0000 (10:45 -0400)] 
Merge branch 'master' into rbtree2

13 years agocall_rcu: handle retry without wait correctly
Mathieu Desnoyers [Thu, 9 Jun 2011 14:39:56 +0000 (10:39 -0400)] 
call_rcu: handle retry without wait correctly

The wait scheme has an implementation problem: if the list is not empty
when the !RT scheme checks for it, it will restart the loop and
decrement the futex (again) without calling call_rcu_wait() (which would
wait until it is set back to 0). So in this case, we can end up
decrementing "futex" to values well below -1.

Fix this by moving the decrement before the loop, and duplicate it after
return from call_rcu_wait() + poll() delay. Also move the "set futex to
0 upon stopping" outside of the loop: this is the only way the loop can
be stopped anyway.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu: fix dependencies on libwfqueue.la
Paolo Bonzini [Thu, 9 Jun 2011 14:16:40 +0000 (10:16 -0400)] 
urcu: fix dependencies on libwfqueue.la

Without this patch, "make -jN" usually fails for N as low as 4.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu_ref: do error checking on urcu_ref_put
Paolo Bonzini [Thu, 9 Jun 2011 14:15:28 +0000 (10:15 -0400)] 
urcu_ref: do error checking on urcu_ref_put

Underflow is what you really want to trap.  When you reach urcu_ref_get,
it is already too late.

[Edit: whitespaces -> tab cleanup]

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agouse generic-size macros for common implementation of atomic ops
Paolo Bonzini [Thu, 9 Jun 2011 14:13:13 +0000 (10:13 -0400)] 
use generic-size macros for common implementation of atomic ops

The definition of _uatomic_cmpxchg is different in x86 and other
architectures.  For x86 it is a 4-argument macro, for other
architectures it is a 3-argument function.  This patch makes it easier
to implement atomic operations incrementally (first as a generic version
and then in machine-specific code), which aids testing and
bisectability.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agocall_rcu: drop mutex
Paolo Bonzini [Thu, 9 Jun 2011 13:32:58 +0000 (09:32 -0400)] 
call_rcu: drop mutex

The mutex is being used only to protect OR accesses to the flags.
Just use atomic operations for that.

[ Edit: this also fixes busy-looping on flags that were previously read
without volatile access, which could lead to never-ending loop given the
appropriate set of compiler optimisations. ]

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agouatomic: add uatomic_and
Paolo Bonzini [Thu, 9 Jun 2011 13:30:40 +0000 (09:30 -0400)] 
uatomic: add uatomic_and

Only x86 support is arch-specific for now, the rest uses either cmpxchg
or gcc __sync_ builtins.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agouatomic: add uatomic_or
Paolo Bonzini [Thu, 9 Jun 2011 13:29:18 +0000 (09:29 -0400)] 
uatomic: add uatomic_or

For now, only the version returning void is used.  Also, I am not
providing PPC versions because I would be unable to test it right
now.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd missing -lwfqueue to add rcu flavors
Mathieu Desnoyers [Thu, 9 Jun 2011 00:39:47 +0000 (20:39 -0400)] 
Add missing -lwfqueue to add rcu flavors

Otherwise, linking with the flavor .so leads to:

/usr/local/lib/liburcu-bp.so: undefined reference to `cds_wfq_enqueue'
/usr/local/lib/liburcu-bp.so: undefined reference to `cds_wfq_init'
/usr/local/lib/liburcu-bp.so: undefined reference to `cds_wfq_node_init'

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd a cds_list_del_init()
Paul E. McKenney [Wed, 8 Jun 2011 23:32:23 +0000 (19:32 -0400)] 
Add a cds_list_del_init()

Needed by some perfbook example code.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd comment to flag purpose of the ->qlen field
Paul E. McKenney [Wed, 8 Jun 2011 23:31:04 +0000 (19:31 -0400)] 
Add comment to flag purpose of the ->qlen field

It is write-only, but is needed for debugging purposes.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMerge branch 'master' into rbtree2
Mathieu Desnoyers [Wed, 8 Jun 2011 22:29:40 +0000 (18:29 -0400)] 
Merge branch 'master' into rbtree2

13 years agocall_rcu: fix futex-based wakeup
Mathieu Desnoyers [Wed, 8 Jun 2011 22:28:46 +0000 (18:28 -0400)] 
call_rcu: fix futex-based wakeup

The initial decrement was missing from the implementation. It now
behaves exactly like the urcu.c wait/wakeup code.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoatomic: fix typo in x86 compat implementation
Paolo Bonzini [Wed, 8 Jun 2011 22:11:34 +0000 (18:11 -0400)] 
atomic: fix typo in x86 compat implementation

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorcutorture: make goflag volatile
Paolo Bonzini [Wed, 8 Jun 2011 22:09:19 +0000 (18:09 -0400)] 
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>
13 years agourcu-qsbr: fix typo
Mathieu Desnoyers [Wed, 8 Jun 2011 22:05:53 +0000 (18:05 -0400)] 
urcu-qsbr: fix typo

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-qsbr: fix typo
Mathieu Desnoyers [Wed, 8 Jun 2011 22:05:53 +0000 (18:05 -0400)] 
urcu-qsbr: fix typo

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMerge remote branch 'origin/master' into rbtree2
Mathieu Desnoyers [Tue, 7 Jun 2011 04:25:22 +0000 (00:25 -0400)] 
Merge remote branch 'origin/master' into rbtree2

13 years agocall_rcu: use futex for wakeup scheme
Mathieu Desnoyers [Tue, 7 Jun 2011 04:16:00 +0000 (00:16 -0400)] 
call_rcu: use futex for wakeup scheme

If I remove the URCU_CALL_RCU_RT flag from the rbtree single writer
test, thus using the pthread_cond_signal mechanism, there is a huge
slowdown: without cpu affinity for the worker threads, it crawls to 129
updates/s (looks like mutex contention between the thread calling
call_rcu and the call_rcu thread). Adding CPU affinity to the per-cpu
call_rcu threads, I get 546 updates/s, which is slightly better (better
cache locality, and maybe the mutex contention is not as bad thanks to
the two threads sharing the same CPU).

So I decided to try replacing pthread_cond_wait/signal with my
futex-based implementation I use for the rest of the urcu lib: it has
the advantage of removing the mutex from the call_rcu() execution
entirely, sampling the "futex" variable without any mutex whatsoever for
the case where no wakeup is needed.

Disabling URCU_CALL_RCU_RT flag, with per-cpu affined call_rcu threads,
with my futex-based wakeup implementation, I get 55754 updates/s (even
better than with URCU_CALL_RCU_RT flag!).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agocall_rcu: use cpu affinity for per-cpu call_rcu threads
Mathieu Desnoyers [Mon, 6 Jun 2011 21:24:42 +0000 (17:24 -0400)] 
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>
13 years agorbtree: Setup per-cpu RCU worker threads in test
Mathieu Desnoyers [Fri, 3 Jun 2011 19:40:09 +0000 (15:40 -0400)] 
rbtree: Setup per-cpu RCU worker threads in test

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMerge branch 'master' into rbtree2
Mathieu Desnoyers [Fri, 3 Jun 2011 16:57:57 +0000 (12:57 -0400)] 
Merge branch 'master' into rbtree2

Conflicts:
Makefile.am

Edited rbtree API to allow rbtree users to specify which call_rcu should
be used.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoDocument the new call_rcu() primitives.
Paul E. McKenney [Fri, 3 Jun 2011 16:49:21 +0000 (12:49 -0400)] 
Document the new call_rcu() primitives.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMake defer_rcu() usable from library using multiple URCU implementations
Paul E. McKenney [Fri, 3 Jun 2011 16:47:56 +0000 (12:47 -0400)] 
Make defer_rcu() usable from library using multiple URCU implementations

[ Edit: minor tab to whitespace cleanup ]

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAllow taking address of rcu_read_lock() and rcu_read_unlock()
Paul E. McKenney [Fri, 3 Jun 2011 16:44:50 +0000 (12:44 -0400)] 
Allow taking address of rcu_read_lock() and rcu_read_unlock()

Also incorporate README feedback from Mathieu and Josh.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMap symbols to allow multiple RCU flavors to be used in one binary
Paul E. McKenney [Fri, 3 Jun 2011 16:43:17 +0000 (12:43 -0400)] 
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>
13 years agoProvide pthread_atfork-friendly interfaces
Paul E. McKenney [Fri, 3 Jun 2011 16:42:00 +0000 (12:42 -0400)] 
Provide pthread_atfork-friendly interfaces

Provides call_rcu_before_fork() and call_rcu_after_fork_parent() to
go with the existing call_rcu_after_fork_child().

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorbtree: Use malloc/free directly in test
Mathieu Desnoyers [Fri, 3 Jun 2011 14:16:59 +0000 (10:16 -0400)] 
rbtree: Use malloc/free directly in test

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoWrap allocation/free into static function
Mathieu Desnoyers [Fri, 3 Jun 2011 14:09:45 +0000 (10:09 -0400)] 
Wrap allocation/free into static function

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate comment
Mathieu Desnoyers [Fri, 3 Jun 2011 14:05:42 +0000 (10:05 -0400)] 
Update comment

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorbtree API change: handle node memory allocation internally
Mathieu Desnoyers [Fri, 3 Jun 2011 14:02:59 +0000 (10:02 -0400)] 
rbtree API change: handle node memory allocation internally

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoEnable range search tests
Mathieu Desnoyers [Thu, 2 Jun 2011 17:33:46 +0000 (13:33 -0400)] 
Enable range search tests

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix search range comparison
Mathieu Desnoyers [Thu, 2 Jun 2011 17:33:31 +0000 (13:33 -0400)] 
Fix search range comparison

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoTemporarily disable range tests
Mathieu Desnoyers [Thu, 2 Jun 2011 16:45:34 +0000 (12:45 -0400)] 
Temporarily disable range tests

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix end range test
Mathieu Desnoyers [Thu, 2 Jun 2011 15:05:33 +0000 (11:05 -0400)] 
Fix end range test

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorbtree: test range lookups with larger ranges
Mathieu Desnoyers [Thu, 2 Jun 2011 15:04:09 +0000 (11:04 -0400)] 
rbtree: test range lookups with larger ranges

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoComment debug facility
Mathieu Desnoyers [Thu, 2 Jun 2011 14:48:25 +0000 (10:48 -0400)] 
Comment debug facility

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd explanation about reader vs writer concurrency behavior
Mathieu Desnoyers [Thu, 2 Jun 2011 14:45:58 +0000 (10:45 -0400)] 
Add explanation about reader vs writer concurrency behavior

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUse larger number pool in test
Mathieu Desnoyers [Thu, 2 Jun 2011 13:54:04 +0000 (09:54 -0400)] 
Use larger number pool in test

Prior range was to stress-test collisions.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate todo comment about memory allocation error
Mathieu Desnoyers [Thu, 2 Jun 2011 13:49:37 +0000 (09:49 -0400)] 
Update todo comment about memory allocation error

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd search begin key test
Mathieu Desnoyers [Thu, 2 Jun 2011 13:42:04 +0000 (09:42 -0400)] 
Add search begin key test

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRange search works
Mathieu Desnoyers [Thu, 2 Jun 2011 13:40:22 +0000 (09:40 -0400)] 
Range search works

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRecalculate max end values on rotation
Mathieu Desnoyers [Thu, 2 Jun 2011 02:37:51 +0000 (22:37 -0400)] 
Recalculate max end values on rotation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUse comparison function for end/max_end
Mathieu Desnoyers [Thu, 2 Jun 2011 02:31:16 +0000 (22:31 -0400)] 
Use comparison function for end/max_end

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorbtree: Add end recalculation for transplant
Mathieu Desnoyers [Thu, 2 Jun 2011 02:22:51 +0000 (22:22 -0400)] 
rbtree: Add end recalculation for transplant

Use a "propagation stop" trick to stop propagation of end update within
the branch we are working on.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd populate_node_end for insertion
Mathieu Desnoyers [Thu, 2 Jun 2011 01:22:25 +0000 (21:22 -0400)] 
Add populate_node_end for insertion

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRemove incorrectly duplicated set_left/set_right
Mathieu Desnoyers [Thu, 2 Jun 2011 00:38:33 +0000 (20:38 -0400)] 
Remove incorrectly duplicated set_left/set_right

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRename node fields to begin/end
Mathieu Desnoyers [Thu, 2 Jun 2011 00:30:54 +0000 (20:30 -0400)] 
Rename node fields to begin/end

This states the inclusiveness (begin) and exclusiveness (end) more
explicitely.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRBtree: Drop initial range support
Mathieu Desnoyers [Wed, 1 Jun 2011 17:38:14 +0000 (13:38 -0400)] 
RBtree: Drop initial range support

Will be reimplemented with ranges within nodes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd pkg-config files for all urcu libs
Yannick Brosseau [Wed, 1 Jun 2011 15:00:25 +0000 (11:00 -0400)] 
Add pkg-config files for all urcu libs

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRBtree: move wmb after node write
Mathieu Desnoyers [Mon, 30 May 2011 20:23:56 +0000 (16:23 -0400)] 
RBtree: move wmb after node write

We need to write all the new info into the node before we publish it
(make it visible to readers).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoCleanup API
Mathieu Desnoyers [Mon, 30 May 2011 19:33:28 +0000 (15:33 -0400)] 
Cleanup API

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRBtree: Only execute usleep() in debug mode
Mathieu Desnoyers [Mon, 30 May 2011 18:50:48 +0000 (14:50 -0400)] 
RBtree: Only execute usleep() in debug mode

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd range test case, fix range search
Mathieu Desnoyers [Mon, 30 May 2011 18:49:31 +0000 (14:49 -0400)] 
Add range test case, fix range search

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd search min/max for ranges
Mathieu Desnoyers [Mon, 30 May 2011 17:49:28 +0000 (13:49 -0400)] 
Add search min/max for ranges

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRCU RBTree: Populate range information (augmented rbtree)
Mathieu Desnoyers [Mon, 30 May 2011 17:16:01 +0000 (13:16 -0400)] 
RCU RBTree: Populate range information (augmented rbtree)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd _STORE_SHARED to set_parent
Mathieu Desnoyers [Mon, 30 May 2011 03:16:51 +0000 (23:16 -0400)] 
Add _STORE_SHARED to set_parent

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRCU rbtree test: handle duplicate random numbers
Mathieu Desnoyers [Mon, 30 May 2011 02:42:29 +0000 (22:42 -0400)] 
RCU rbtree test: handle duplicate random numbers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorbtree: disable debug mode
Mathieu Desnoyers [Mon, 30 May 2011 02:22:05 +0000 (22:22 -0400)] 
rbtree: disable debug mode

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRCU RB tree test : add prev/next/max/min test
Mathieu Desnoyers [Mon, 30 May 2011 02:18:24 +0000 (22:18 -0400)] 
RCU RB tree test : add prev/next/max/min test

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix rcu_rbtree_prev
Mathieu Desnoyers [Mon, 30 May 2011 02:18:07 +0000 (22:18 -0400)] 
Fix rcu_rbtree_prev

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoCleanup header
Mathieu Desnoyers [Mon, 30 May 2011 02:17:50 +0000 (22:17 -0400)] 
Cleanup header

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAtomicize parent pointer and position update/read
Mathieu Desnoyers [Sun, 29 May 2011 16:38:13 +0000 (12:38 -0400)] 
Atomicize parent pointer and position update/read

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRCU search fix
Mathieu Desnoyers [Sun, 29 May 2011 15:33:53 +0000 (11:33 -0400)] 
RCU search fix

Fix removal by using the decay scheme for the whole branch from z->right
to y (inclusively) when transplanting y up to z.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd missing read lock in test, cleanup transplant
Mathieu Desnoyers [Sun, 29 May 2011 00:46:13 +0000 (20:46 -0400)] 
Add missing read lock in test, cleanup transplant

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUse decay for rotate and transplant
Mathieu Desnoyers [Sat, 28 May 2011 23:20:59 +0000 (19:20 -0400)] 
Use decay for rotate and transplant

Handles assumptions about shared nil node more gracefully.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd RCU read-side test
Mathieu Desnoyers [Sat, 28 May 2011 22:22:43 +0000 (18:22 -0400)] 
Add RCU read-side test

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix rbtree for nr items > 4, add rcu and non-rcu rotate and transplant
Mathieu Desnoyers [Sat, 28 May 2011 22:14:37 +0000 (18:14 -0400)] 
Fix rbtree for nr items > 4, add rcu and non-rcu rotate and transplant

Add non-RCU rotate and transplant for debugging.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorcu rbtree: make rotation reader-aware
Mathieu Desnoyers [Sat, 28 May 2011 21:47:23 +0000 (17:47 -0400)] 
rcu rbtree: make rotation reader-aware

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoImplement transplant based on decay scheme
Mathieu Desnoyers [Sat, 28 May 2011 21:26:41 +0000 (17:26 -0400)] 
Implement transplant based on decay scheme

Works with writer test. Concurrent RCU reader not supported yet.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorbtree: use decay scheme
Mathieu Desnoyers [Sat, 28 May 2011 17:35:21 +0000 (13:35 -0400)] 
rbtree: use decay scheme

Rotations implemented. Write-only tested. Not supporting RCU readers
yet.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoReimplement basic non-RCU rbtree
Mathieu Desnoyers [Sat, 28 May 2011 00:39:52 +0000 (20:39 -0400)] 
Reimplement basic non-RCU rbtree

Use as a starting point for RCU rbtree iterative development/test
starting from this non-RCU implementation.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agouserspace-rcu tests: zero array before using
Colin McCabe [Wed, 11 May 2011 11:38:29 +0000 (07:38 -0400)] 
userspace-rcu tests: zero array before using

It seems like we need the test arrays to start out zeroed.

Without this patch, I get errors like this when running the tests:
test_urcu: test_urcu.c:201: test_array_alloc:
Assertion `test_array[index].a == 0xDEADBEEF || test_array[index].a ==
0' failed.

Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoarm: put CONFIG_RCU_ARM_HAVE_DMB in the global config.h
Jason Wessel [Wed, 4 May 2011 19:14:14 +0000 (15:14 -0400)] 
arm: put CONFIG_RCU_ARM_HAVE_DMB in the global config.h

Change CONFIG_ARM_HAVE_DMB to CONFIG_RCU_ARM_HAVE_DMB while at the
same time making it seen as a global setting in urch/config.h.

The initial ARM < v7 work missed this setting, which allowed the URCU
to package to build correctly, but exposed the memorry barriers
defines incorrectly for other applications using the URCU headers.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoCleanup: remove unused value warning
Mathieu Desnoyers [Mon, 21 Mar 2011 21:55:30 +0000 (17:55 -0400)] 
Cleanup: remove unused value warning

return value of cmpxchg is purposefully unused in
_cds_lfq_enqueue_rcu(). Cast it to (void) to remove the compiler
warning.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoProvide cleanup interfaces for per-CPU and per-thread call_rcu threads
Paul E. McKenney [Wed, 9 Mar 2011 02:51:54 +0000 (21:51 -0500)] 
Provide cleanup interfaces for per-CPU and per-thread call_rcu threads

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMaintain list of struct call_rcu_data to keep valgrind happy.
Paul E. McKenney [Wed, 9 Mar 2011 02:50:26 +0000 (21:50 -0500)] 
Maintain list of struct call_rcu_data to keep valgrind happy.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd call_rcu() interface
Paul E. McKenney [Wed, 9 Mar 2011 02:48:49 +0000 (21:48 -0500)] 
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>
13 years agoFix ppc asm syntax error.
Paul E. McKenney [Wed, 9 Mar 2011 02:37:43 +0000 (21:37 -0500)] 
Fix ppc asm syntax error.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoupdate version to 0.5.4 v0.5.4
Mathieu Desnoyers [Fri, 4 Mar 2011 17:33:20 +0000 (12:33 -0500)] 
update version to 0.5.4

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-bp: Update fork() handling
Mathieu Desnoyers [Fri, 4 Mar 2011 17:25:08 +0000 (12:25 -0500)] 
urcu-bp: Update fork() handling

Introduce

extern void rcu_bp_before_fork(void);
extern void rcu_bp_after_fork_parent(void);
extern void rcu_bp_after_fork_child(void);

to handle fork gracefully. These disable signals and hold the registry mutex
across forks.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoVersion 0.5.3 v0.5.3
Mathieu Desnoyers [Thu, 3 Mar 2011 21:08:21 +0000 (16:08 -0500)] 
Version 0.5.3

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate README for urcu-bp fork handling
Mathieu Desnoyers [Thu, 3 Mar 2011 16:49:06 +0000 (11:49 -0500)] 
Update README for urcu-bp fork handling

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoREADME: describe fork() interaction
Mathieu Desnoyers [Thu, 3 Mar 2011 15:05:48 +0000 (10:05 -0500)] 
README: describe fork() interaction

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-bp: no "need_mb" in distrust signal config
Mathieu Desnoyers [Thu, 3 Mar 2011 02:19:00 +0000 (21:19 -0500)] 
urcu-bp: no "need_mb" in distrust signal config

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate the README to change armv7l to arm
Jason Wessel [Mon, 28 Feb 2011 16:36:42 +0000 (11:36 -0500)] 
Update the README to change armv7l to arm

ARM v5 and ARM v6 are known to work using compiler barriers.

[ edit: add a missing comma while we are there ]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoARM: use dmb for rmb and wmb in addition to mb
Mathieu Desnoyers [Mon, 28 Feb 2011 16:35:09 +0000 (11:35 -0500)] 
ARM: use dmb for rmb and wmb in addition to mb

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd a test for the dmb instruction on ARM
Jason Wessel [Mon, 28 Feb 2011 16:34:10 +0000 (11:34 -0500)] 
Add a test for the dmb instruction on ARM

The dmb instruction is used to implement a memory barrier on modern
ARM hardware.  The older generations of processors which are included
in single processor systems can get by on the generic implementation
of the cmm_mb().  This will allow the user space rcu to work on many
other ARM systems.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agohange the arm headers to remove all the references to v7
Jason Wessel [Mon, 28 Feb 2011 16:33:42 +0000 (11:33 -0500)] 
hange the arm headers to remove all the references to v7

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMake armv7l headers generic for the arm architecture
Jason Wessel [Mon, 28 Feb 2011 16:33:19 +0000 (11:33 -0500)] 
Make armv7l headers generic for the arm architecture

This commit simply moves the files named *armv7l* to *arm*

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoURCU list: remove leftover namespace clash (list_t type removed)
Mathieu Desnoyers [Mon, 21 Feb 2011 21:17:44 +0000 (16:17 -0500)] 
URCU list: remove leftover namespace clash (list_t type removed)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu_defer: update test programs (build fix)
Mathieu Desnoyers [Fri, 31 Dec 2010 17:54:52 +0000 (12:54 -0500)] 
urcu_defer: update test programs (build fix)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorcu_defer test: handle error value
Mathieu Desnoyers [Fri, 31 Dec 2010 17:53:34 +0000 (12:53 -0500)] 
rcu_defer test: handle error value

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-defer: handle malloc error value
Mathieu Desnoyers [Fri, 31 Dec 2010 17:50:59 +0000 (12:50 -0500)] 
urcu-defer: handle malloc error value

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14 years agoVersion 0.5.2 v0.5.2
Mathieu Desnoyers [Fri, 19 Nov 2010 03:20:31 +0000 (22:20 -0500)] 
Version 0.5.2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14 years agoFix get_cycles -> caa_get_cycles
Mathieu Desnoyers [Fri, 19 Nov 2010 03:18:42 +0000 (22:18 -0500)] 
Fix get_cycles -> caa_get_cycles

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14 years agoVersion 0.5.1 v0.5.1
Mathieu Desnoyers [Fri, 19 Nov 2010 02:51:16 +0000 (21:51 -0500)] 
Version 0.5.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14 years agoACCESS_ONCE should also have CMM_ prefix
Mathieu Desnoyers [Fri, 19 Nov 2010 02:47:14 +0000 (21:47 -0500)] 
ACCESS_ONCE should also have CMM_ prefix

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14 years agoLOAD_SHARED and STORE_SHARED should have CMM_ prefix
Mathieu Desnoyers [Fri, 19 Nov 2010 02:44:59 +0000 (21:44 -0500)] 
LOAD_SHARED and STORE_SHARED should have CMM_ prefix

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14 years agoFix CAA_CAA -> CAA
Mathieu Desnoyers [Fri, 19 Nov 2010 02:38:17 +0000 (21:38 -0500)] 
Fix CAA_CAA -> CAA

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.043344 seconds and 4 git commands to generate.