userspace-rcu.git
13 years agolfq baseline: check for empty list
Mathieu Desnoyers [Mon, 5 Sep 2011 00:10:41 +0000 (20:10 -0400)] 
lfq baseline: check for empty list

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMerge branch 'master' into tests/lfqueue-baseline
Mathieu Desnoyers [Mon, 5 Sep 2011 00:07:59 +0000 (20:07 -0400)] 
Merge branch 'master' into tests/lfqueue-baseline

13 years agoAdd cds_list_empty
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>
13 years agotest_lfq_baseline: update
Mathieu Desnoyers [Mon, 5 Sep 2011 00:04:35 +0000 (20:04 -0400)] 
test_lfq_baseline: update

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd lfq baseline test
Mathieu Desnoyers [Sun, 4 Sep 2011 23:56:20 +0000 (19:56 -0400)] 
Add lfq baseline test

Generic list + mutex.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agolist: Add cds_list_first_entry
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>
13 years agorculfstack/queue: define _LGPL_SOURCE around static header include
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>
13 years agoRevert "Create per RCU flavor CDS libraries"
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>
13 years agoRevert "CDS API: removal of rcu_read lock/unlock dep, removal of call_rcu argument...
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>
13 years agoAdd __rcu annotation (unimplemented)
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>
13 years agoFix incorrect fsf address in header files
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>
13 years agowfstack: push returns prior stack emptiness state
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>
13 years agoMake lf stack push return if the stack was empty
Mathieu Desnoyers [Thu, 1 Sep 2011 13:28:30 +0000 (09:28 -0400)] 
Make lf stack push return if the stack was empty

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoDocument caa_container_of
Mathieu Desnoyers [Tue, 23 Aug 2011 21:22:00 +0000 (17:22 -0400)] 
Document caa_container_of

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-bp: do not call munmap for NULL registry at exit
Mathieu Desnoyers [Sat, 20 Aug 2011 17:50:08 +0000 (13:50 -0400)] 
urcu-bp: do not call munmap for NULL registry at exit

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu libraries can directly use the _LGPL_SOURCE wfqueue
Mathieu Desnoyers [Thu, 18 Aug 2011 17:41:11 +0000 (13:41 -0400)] 
urcu libraries can directly use the _LGPL_SOURCE wfqueue

No need to link dynamically with the data structure object.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfstack: document "push"
Mathieu Desnoyers [Thu, 18 Aug 2011 16:13:44 +0000 (12:13 -0400)] 
rculfstack: document "push"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd runall.sh to tarball
Mathieu Desnoyers [Wed, 17 Aug 2011 21:58:30 +0000 (17:58 -0400)] 
Add runall.sh to tarball

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix build order of liburcu-cds-common
Mathieu Desnoyers [Wed, 17 Aug 2011 21:57:19 +0000 (17:57 -0400)] 
Fix build order of liburcu-cds-common

Caused make install to fail.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoCDS API: removal of rcu_read lock/unlock dep, removal of call_rcu argument from init
Mathieu Desnoyers [Wed, 17 Aug 2011 21:54:33 +0000 (17:54 -0400)] 
CDS API: removal of rcu_read lock/unlock dep, removal of call_rcu argument from init

* API change * for all liburcu-cds* flavors.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix missing check for SYS_membarrier in map header
Mathieu Desnoyers [Wed, 17 Aug 2011 21:54:07 +0000 (17:54 -0400)] 
Fix missing check for SYS_membarrier in map header

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoCreate per RCU flavor CDS libraries
Mathieu Desnoyers [Wed, 17 Aug 2011 20:42:20 +0000 (16:42 -0400)] 
Create per RCU flavor CDS libraries

Introduce per-flavor concurrent data structure libraries for data
structures depending on RCU:

liburcu-cds: memb flavor (default), matches -lurcu
liburcu-cds-qsbr: qsbr flavor, matches -lurcu-qsbr
liburcu-cds-mb: mb flavor, matches -lurcu-mb
liburcu-cds-signal, matches -lurcu-signal
liburcu-cds-bp, matches -lurcu-bp

liburcu-cds-common: Data structures not depending on RCU for
synchronization.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMerge branch 'master' into lfqueue-dev lfqueue-dev
Mathieu Desnoyers [Wed, 17 Aug 2011 10:07:35 +0000 (06:07 -0400)] 
Merge branch 'master' into lfqueue-dev

13 years agourcu-qsbr: avoid useless futex wakeups and burning CPU for long grace periods
Paolo Bonzini [Wed, 17 Aug 2011 09:42:51 +0000 (05:42 -0400)] 
urcu-qsbr: avoid useless futex wakeups and burning CPU for long grace periods

I noticed that urcu makes exactly _one_ attempt at using futexes
to avoid busy looping on synchronize_rcu.  The attached patch instead
switches from busy waiting to futexes after RCU_QS_ACTIVE_ATTEMPTS.
To limit the amount of system calls, reading threads remember whether
they already had a quiescent state in this grace period; if so they were
already removed from the list, and can avoid signaling the futex.

Performance measured with rcutorture (nreaders: 10, nupdaters: 1,
duration: 10, median of nine runs):

     RCU_QS_ACTIVE_ATTEMPTS == 100, no patch         n_updates = 292
     RCU_QS_ACTIVE_ATTEMPTS == 1, no patch           n_updates = 290
     RCU_QS_ACTIVE_ATTEMPTS == 100, with patch       n_updates = 408
     RCU_QS_ACTIVE_ATTEMPTS == 1, with patch         n_updates = 404

(the first two cases are obviously the same; the only change is
when the futex is used, but over many calls there is no difference).

This patch matches the update to the Promela model.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoapi: reimplement BUILD_BUG_ON in compiler.h
Paolo Bonzini [Wed, 17 Aug 2011 09:33:58 +0000 (05:33 -0400)] 
api: reimplement BUILD_BUG_ON in compiler.h

Even though it's just two lines of code, I'm reimplementing it
cleanly out of paranoia.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agotest api cleanup: remove unused primitives
Paolo Bonzini [Wed, 17 Aug 2011 09:31:21 +0000 (05:31 -0400)] 
test api cleanup: remove unused primitives

[ Mathieu: the rationale for this is that we can always add back that
  code if every needed. Removing leftover GPLv2 test code is an
  incentive to create the appropriate library-wide LGPL/MIT-style
  abstractions.]

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMerge branch 'master' into lfqueue-dev
Mathieu Desnoyers [Wed, 17 Aug 2011 09:28:33 +0000 (05:28 -0400)] 
Merge branch 'master' into lfqueue-dev

13 years agoput thread offline while waiting for the init flag
Paolo Bonzini [Tue, 9 Aug 2011 20:49:27 +0000 (16:49 -0400)] 
put thread offline while waiting for the init flag

Otherwise, the call_rcu thread might end up in a synchronize_rcu that
never ends.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu: move private definitions to .c file
Paolo Bonzini [Tue, 9 Aug 2011 20:44:20 +0000 (16:44 -0400)] 
urcu: move private definitions to .c file

The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS
and KICK_READER_LOOPS.  Move the definition to urcu.c.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-bp: move private definitions to .c file
Paolo Bonzini [Tue, 9 Aug 2011 20:43:21 +0000 (16:43 -0400)] 
urcu-bp: move private definitions to .c file

The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS.
Move the definition to urcu-bp.c.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-qsbr: move private definitions to .c file
Paolo Bonzini [Tue, 9 Aug 2011 20:42:53 +0000 (16:42 -0400)] 
urcu-qsbr: move private definitions to .c file

The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS.
Move the definition to urcu-qsbr.c.  Also remove KICK_READER_LOOPS.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorcutorture: fix rcutorture-qsbr
Paolo Bonzini [Tue, 9 Aug 2011 20:40:29 +0000 (16:40 -0400)] 
rcutorture: fix rcutorture-qsbr

rcutorture-qsbr is not marking quiescent states, so it will always
have just one update in the whole test.  Fix it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agowfqueue: fix type-incorrect assignment
Paolo Bonzini [Tue, 9 Aug 2011 12:37:14 +0000 (08:37 -0400)] 
wfqueue: fix type-incorrect assignment

The "old_tail = q->tail, q->tail = node" assignment in wfqueue
is not type safe; q->tail is a pointer to pointer to node and the
correct value to assign is &node->next.  While the arithmetic is
the same, it is better to be tidy.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix tests Makefile EXTRA_DIST to use api.h
Mathieu Desnoyers [Tue, 16 Aug 2011 11:11:16 +0000 (07:11 -0400)] 
Fix tests Makefile EXTRA_DIST to use api.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix choice of default flavour in urcu/map/urcu.h
Duncan Sands [Tue, 16 Aug 2011 11:10:01 +0000 (07:10 -0400)] 
Fix choice of default flavour in urcu/map/urcu.h

Hi, I noticed in the 0.64 release (and git too) that if a flavour is not
specified explicitly then RCU_MB is chosen in urcu/map/urcu.h, while the
docs say and the Makefile expects RCU_MEMBARRIER.  Note that the header
file urcu/static/urcu.h has similar logic but uses RCU_MEMBARRIER for
the default.

Before this patch:

$ nm *.a | grep rcu_init
00000000000003c0 T rcu_init_mb
00000000000003c0 T rcu_init_mb
0000000000000000 T rcu_init_sig

After this patch:

$ nm *.a | grep rcu_init
00000000000003c0 T rcu_init_memb
00000000000003c0 T rcu_init_mb
0000000000000000 T rcu_init_sig

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoapi: remove list/hlist
Paolo Bonzini [Tue, 16 Aug 2011 10:52:54 +0000 (06:52 -0400)] 
api: remove list/hlist

Remove the parts that actually caused compilation to fail.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoapi: remove arch-specific files
Paolo Bonzini [Tue, 16 Aug 2011 10:51:55 +0000 (06:51 -0400)] 
api: remove arch-specific files

No change since they were a subset of api_gcc.h.  api_gcc.h is
renamed to api.h, and configure need not create a symlink anymore.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoapi: make api_gcc.h a superset of the other headers
Paolo Bonzini [Tue, 16 Aug 2011 10:41:06 +0000 (06:41 -0400)] 
api: make api_gcc.h a superset of the other headers

After this patch the only differences are:

- for_each_tid is now defined in api_x86.h

- HAVE_CPU_SET_T and HAVE_SCHED_SETAFFINITY are now defined in api_ppc.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agotests api: remove atomics
Paolo Bonzini [Fri, 12 Aug 2011 22:23:59 +0000 (18:23 -0400)] 
tests api: remove atomics

The code is #if 0'd already, remove it.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoput thread offline while waiting for the init flag
Paolo Bonzini [Tue, 9 Aug 2011 20:49:27 +0000 (16:49 -0400)] 
put thread offline while waiting for the init flag

Otherwise, the call_rcu thread might end up in a synchronize_rcu that
never ends.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu: move private definitions to .c file
Paolo Bonzini [Tue, 9 Aug 2011 20:44:20 +0000 (16:44 -0400)] 
urcu: move private definitions to .c file

The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS
and KICK_READER_LOOPS.  Move the definition to urcu.c.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-bp: move private definitions to .c file
Paolo Bonzini [Tue, 9 Aug 2011 20:43:21 +0000 (16:43 -0400)] 
urcu-bp: move private definitions to .c file

The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS.
Move the definition to urcu-bp.c.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-qsbr: move private definitions to .c file
Paolo Bonzini [Tue, 9 Aug 2011 20:42:53 +0000 (16:42 -0400)] 
urcu-qsbr: move private definitions to .c file

The reader does not and should not know about RCU_QS_ACTIVE_ATTEMPTS.
Move the definition to urcu-qsbr.c.  Also remove KICK_READER_LOOPS.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorcutorture: fix rcutorture-qsbr
Paolo Bonzini [Tue, 9 Aug 2011 20:40:29 +0000 (16:40 -0400)] 
rcutorture: fix rcutorture-qsbr

rcutorture-qsbr is not marking quiescent states, so it will always
have just one update in the whole test.  Fix it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agowfqueue: fix type-incorrect assignment
Paolo Bonzini [Tue, 9 Aug 2011 12:37:14 +0000 (08:37 -0400)] 
wfqueue: fix type-incorrect assignment

The "old_tail = q->tail, q->tail = node" assignment in wfqueue
is not type safe; q->tail is a pointer to pointer to node and the
correct value to assign is &node->next.  While the arithmetic is
the same, it is better to be tidy.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMerge branch 'master' into lfqueue-dev
Mathieu Desnoyers [Mon, 8 Aug 2011 15:15:03 +0000 (11:15 -0400)] 
Merge branch 'master' into lfqueue-dev

13 years agoUse caa_ prefix for min() and max()
Mathieu Desnoyers [Tue, 2 Aug 2011 17:22:38 +0000 (13:22 -0400)] 
Use caa_ prefix for min() and max()

Defining min/max macros clashes with C++.

Reported-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoVersion 0.6.4, update changelog v0.6.4
Mathieu Desnoyers [Thu, 21 Jul 2011 21:25:43 +0000 (17:25 -0400)] 
Version 0.6.4, update changelog

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMerge branch 'master' into lfqueue-dev
Mathieu Desnoyers [Thu, 21 Jul 2011 21:17:47 +0000 (17:17 -0400)] 
Merge branch 'master' into lfqueue-dev

13 years agoFix ARM uatomic: missing return in uatomic and/or
Mathieu Desnoyers [Thu, 21 Jul 2011 20:50:42 +0000 (16:50 -0400)] 
Fix ARM uatomic: missing return in uatomic and/or

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfqueue: provide locklessness by allowing multiple dummy nodes
Mathieu Desnoyers [Fri, 1 Jul 2011 23:51:48 +0000 (19:51 -0400)] 
rculfqueue: provide locklessness by allowing multiple dummy nodes

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorcu lfqueue: make dequeue lockless by helping out other dequeuers
Mathieu Desnoyers [Fri, 1 Jul 2011 22:50:15 +0000 (18:50 -0400)] 
rcu lfqueue: make dequeue lockless by helping out other dequeuers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfqueue: Document dummy pointer value access
Mathieu Desnoyers [Fri, 1 Jul 2011 21:42:48 +0000 (17:42 -0400)] 
rculfqueue: Document dummy pointer value access

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfqueue: Keep a reference to the current dummy node rather than using low bit
Mathieu Desnoyers [Fri, 1 Jul 2011 21:35:07 +0000 (17:35 -0400)] 
rculfqueue: Keep a reference to the current dummy node rather than using low bit

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfqueue: only one dummy node is needed
Mathieu Desnoyers [Fri, 1 Jul 2011 21:24:24 +0000 (17:24 -0400)] 
rculfqueue: only one dummy node is needed

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfstack: update comment
Mathieu Desnoyers [Fri, 1 Jul 2011 21:23:39 +0000 (17:23 -0400)] 
rculfstack: update comment

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRCU lf queue: Add assert for memory allocation
Mathieu Desnoyers [Fri, 1 Jul 2011 21:06:16 +0000 (17:06 -0400)] 
RCU lf queue: Add assert for memory allocation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfstack: header implementation should be defined as static inline
Mathieu Desnoyers [Fri, 1 Jul 2011 20:17:55 +0000 (16:17 -0400)] 
rculfstack: header implementation should be defined as static inline

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agowfstack: header implementation should be defined as static inline
Mathieu Desnoyers [Fri, 1 Jul 2011 20:17:14 +0000 (16:17 -0400)] 
wfstack: header implementation should be defined as static inline

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRCU lfqueue: Now works without reference counting (API change)
Mathieu Desnoyers [Fri, 1 Jul 2011 20:34:38 +0000 (16:34 -0400)] 
RCU lfqueue: Now works without reference counting (API change)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfstack: header implementation should be defined as static inline
Mathieu Desnoyers [Fri, 1 Jul 2011 20:17:55 +0000 (16:17 -0400)] 
rculfstack: header implementation should be defined as static inline

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agowfstack: header implementation should be defined as static inline
Mathieu Desnoyers [Fri, 1 Jul 2011 20:17:14 +0000 (16:17 -0400)] 
wfstack: header implementation should be defined as static inline

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu tests: hold mutex across use of custom allocator
Mathieu Desnoyers [Thu, 30 Jun 2011 14:45:33 +0000 (10:45 -0400)] 
urcu tests: hold mutex across use of custom allocator

A thread preempted for a long period of time could race, when scheduled
again, with another thread that would have been allocating/freeing
entries (thus wrapping-around the available buffer), which would trigger
this race only when overcommitting the number of threads compared to the
number of available CPUs.

Taking the mutex across alloc and free to fix this.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-bp: mremap wrapper fix
Mathieu Desnoyers [Wed, 29 Jun 2011 20:39:19 +0000 (16:39 -0400)] 
urcu-bp: mremap wrapper fix

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-bp: add mremap wrapper for non-linux systems
Mathieu Desnoyers [Wed, 29 Jun 2011 20:38:06 +0000 (16:38 -0400)] 
urcu-bp: add mremap wrapper for non-linux systems

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-bp: don't copy old region upon mremap
Mathieu Desnoyers [Wed, 29 Jun 2011 20:31:16 +0000 (16:31 -0400)] 
urcu-bp: don't copy old region upon mremap

mremap keeps the same virtual pages for the old/new mappings. So
explicitly copying from the old mapping is not needed, and probably
buggy, since the old mapping might have been unmapped.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoapi.h: fix type warning
Mathieu Desnoyers [Wed, 29 Jun 2011 18:35:08 +0000 (14:35 -0400)] 
api.h: fix type warning

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agonon-linux system membarrier fallback update
Mathieu Desnoyers [Wed, 29 Jun 2011 18:20:31 +0000 (14:20 -0400)] 
non-linux system membarrier fallback update

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agopthread_self should be cast to unsigned long
Mathieu Desnoyers [Wed, 29 Jun 2011 18:12:23 +0000 (14:12 -0400)] 
pthread_self should be cast to unsigned long

Used as part of the random seed along with time().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd MAP_ANONYMOUS mapping to MAP_ANON for BSD build
Mathieu Desnoyers [Wed, 29 Jun 2011 17:47:28 +0000 (13:47 -0400)] 
Add MAP_ANONYMOUS mapping to MAP_ANON for BSD build

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agotests: only include syscall.h on linux systems
Mathieu Desnoyers [Wed, 29 Jun 2011 17:43:22 +0000 (13:43 -0400)] 
tests: only include syscall.h on linux systems

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-bp, urcu-qsbr: remove unneeded syscall.h include
Mathieu Desnoyers [Wed, 29 Jun 2011 17:34:48 +0000 (13:34 -0400)] 
urcu-bp, urcu-qsbr: remove unneeded syscall.h include

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agourcu-defer: remove unneeded syscall.h include
Mathieu Desnoyers [Wed, 29 Jun 2011 17:30:42 +0000 (13:30 -0400)] 
urcu-defer: remove unneeded syscall.h include

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agocall_rcu: per_cpu_call_rcu_data should be non-const
Mathieu Desnoyers [Wed, 29 Jun 2011 17:29:38 +0000 (13:29 -0400)] 
call_rcu: per_cpu_call_rcu_data should be non-const

On FreeBSD:

In file included from urcu.c:438:
urcu-call-rcu-impl.h: In function 'get_cpu_call_rcu_data_mb':
urcu-call-rcu-impl.h:325: warning: return discards qualifiers from pointer target type

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate README info about gcc compability
Mathieu Desnoyers [Wed, 29 Jun 2011 17:02:45 +0000 (13:02 -0400)] 
Update README info about gcc compability

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix urcu-call-rcu-impl.h missing call_rcu_wait for non-linux systems
Mathieu Desnoyers [Wed, 29 Jun 2011 16:51:41 +0000 (12:51 -0400)] 
Fix urcu-call-rcu-impl.h missing call_rcu_wait for non-linux systems

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agocompat_futex_async: fix missing return
Mathieu Desnoyers [Wed, 29 Jun 2011 16:49:35 +0000 (12:49 -0400)] 
compat_futex_async: fix missing return

compat_futex.c: In function `compat_futex_async':
compat_futex.c:114: warning: control reaches end of non-void function

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoCheck for __linux__ before including syscall.h
Mathieu Desnoyers [Wed, 29 Jun 2011 16:46:52 +0000 (12:46 -0400)] 
Check for __linux__ before including syscall.h

Reported-by: Jean-François Brousseau <jfb@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRemove unused local variables from compat_futex_async
Mathieu Desnoyers [Wed, 29 Jun 2011 16:30:30 +0000 (12:30 -0400)] 
Remove unused local variables from compat_futex_async

Reported-by: Jean-François Brousseau <jfb@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRemove unneeded syscall.h include from urcu-call-rcu-impl.h
Mathieu Desnoyers [Wed, 29 Jun 2011 16:29:39 +0000 (12:29 -0400)] 
Remove unneeded syscall.h include from urcu-call-rcu-impl.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd ChangeLog file to Makefile.am
Mathieu Desnoyers [Mon, 27 Jun 2011 21:52:41 +0000 (17:52 -0400)] 
Add ChangeLog file to Makefile.am

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd changelog, update version to 0.6.3 v0.6.3
Mathieu Desnoyers [Mon, 27 Jun 2011 21:49:38 +0000 (17:49 -0400)] 
Add changelog, update version to 0.6.3

13 years agouatomic: fix warning about unused variable
Mathieu Desnoyers [Mon, 27 Jun 2011 21:07:25 +0000 (17:07 -0400)] 
uatomic: fix warning about unused variable

Fix:

compat_arch_x86.c: In function '_compat_uatomic_set':
compat_arch_x86.c:104:16: warning: variable 'result' set but not used [-Wunused-but-set-variable]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agouatomic: fix i386 support
Mathieu Desnoyers [Mon, 27 Jun 2011 20:54:56 +0000 (16:54 -0400)] 
uatomic: fix i386 support

Fix:

* Incorrect prototype for uatomic_and and uatomic_or in i386
  compatibility code.
* Missing $(COMPAT) code inclusion in wfq/lfq tests.
* Silence gcc warnings about compat code (branch volountarily causing a
  linker error, which can never return).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate version to 0.6.2 v0.6.2
Mathieu Desnoyers [Tue, 14 Jun 2011 13:30:19 +0000 (09:30 -0400)] 
Update version to 0.6.2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agouatomic generic: map uatomic_and/or to correct symbols
Mathieu Desnoyers [Tue, 14 Jun 2011 13:15:20 +0000 (09:15 -0400)] 
uatomic generic: map uatomic_and/or to correct symbols

Leading underscore was missing.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix generic atomic ops and/or: add missing return
Mathieu Desnoyers [Tue, 14 Jun 2011 12:55:44 +0000 (08:55 -0400)] 
Fix generic atomic ops and/or: add missing return

Fixes build on powerpc:

./urcu/uatomic/generic.h: In function '_uatomic_and':
./urcu/uatomic/generic.h:310:2: warning: 'return' with a value, in
function returning void
./urcu/uatomic/generic.h: In function '_uatomic_or':
./urcu/uatomic/generic.h:374:2: warning: 'return' with a value, in
function returning void

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix test warning
Mathieu Desnoyers [Mon, 13 Jun 2011 20:06:52 +0000 (16:06 -0400)] 
Fix test warning

Patch from:
https://build.opensuse.org/package/view_file?file=liburcu0-cleanup.patch&package=liburcu0&project=devel%3Atools%3Alttng&srcmd5=fa3ab9fae0401b4c0f73a9cf474eea16

fixes a warning in the liburcu tests.

Reported-by: Yannick Brosseau <yannick.brosseau@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd missing headers into tarball, version 0.6.1 v0.6.1
Mathieu Desnoyers [Mon, 13 Jun 2011 14:01:18 +0000 (10:01 -0400)] 
Add missing headers into tarball, version 0.6.1

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate version to 0.6.0 v0.6.0
Mathieu Desnoyers [Sat, 11 Jun 2011 00:46:03 +0000 (20:46 -0400)] 
Update version to 0.6.0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFutex: turn "int" into "int32_t" for portability
Mathieu Desnoyers [Sat, 11 Jun 2011 00:16:28 +0000 (20:16 -0400)] 
Futex: turn "int" into "int32_t" for portability

Even though int is 32-bit on all architectures supported by liburcu so
far, make it future-proof by uint a int32_t, which enforces the same
type width used by the system call in the kernel.

Using int32_t and not uint32_t to make comparison with 0 more
straightforward.

Reported-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd back uatomic_arch.h for slow deprecation process
Mathieu Desnoyers [Fri, 10 Jun 2011 23:20:50 +0000 (19:20 -0400)] 
Add back uatomic_arch.h for slow deprecation process

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd back urcu-futex.h and urcu_ref.h for slow deprecation
Mathieu Desnoyers [Fri, 10 Jun 2011 23:17:25 +0000 (19:17 -0400)] 
Add back urcu-futex.h and urcu_ref.h for slow deprecation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd ldconfig step to README
Mathieu Desnoyers [Fri, 10 Jun 2011 22:36:59 +0000 (18:36 -0400)] 
Add ldconfig step to README

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd a pkg-config file for the new liburcu-cds
Yannick Brosseau [Fri, 10 Jun 2011 21:28:50 +0000 (17:28 -0400)] 
Add a pkg-config file for the new liburcu-cds

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoConsolidate _LIBADD and _DEPENDENCIES in Makefile.am
Alexandre Montplaisir [Fri, 10 Jun 2011 21:14:23 +0000 (17:14 -0400)] 
Consolidate _LIBADD and _DEPENDENCIES in Makefile.am

Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd urcu/cds.h placeholder for all CDS headers
Mathieu Desnoyers [Fri, 10 Jun 2011 21:11:04 +0000 (17:11 -0400)] 
Add urcu/cds.h placeholder for all CDS headers

Using CDS headers becomes as simple as:

 #include <urcu/cds.h>

and link with

 -lurcu-cds

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMove the version-info to the AM_LDFLAGS variable
Yannick Brosseau [Fri, 10 Jun 2011 20:58:15 +0000 (16:58 -0400)] 
Move the version-info to the AM_LDFLAGS variable

Since all the lib builded in this directory use the same version
we can put this command in the global variable

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoInstalled headers should only include other headers with < >
Mathieu Desnoyers [Fri, 10 Jun 2011 20:11:30 +0000 (16:11 -0400)] 
Installed headers should only include other headers with < >

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRename urcu/urcu-futex.h to urcu/futex.h
Mathieu Desnoyers [Fri, 10 Jun 2011 20:06:00 +0000 (16:06 -0400)] 
Rename urcu/urcu-futex.h to urcu/futex.h

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