userspace-rcu.git
13 years agorculfhash: shrink size of dummy node
Mathieu Desnoyers [Sat, 9 Jul 2011 19:02:26 +0000 (15:02 -0400)] 
rculfhash: shrink size of dummy node

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: wait for call_rcu quiescence before destroy
Mathieu Desnoyers [Sat, 9 Jul 2011 17:28:01 +0000 (13:28 -0400)] 
rculfhash: wait for call_rcu quiescence before destroy

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: add c++ ifdef
Mathieu Desnoyers [Thu, 7 Jul 2011 16:27:19 +0000 (12:27 -0400)] 
rculfhash: add c++ ifdef

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash test: add options
Mathieu Desnoyers [Thu, 7 Jul 2011 16:19:14 +0000 (12:19 -0400)] 
rculfhash test: add options

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash test: use per-cpu call-rcu threads
Mathieu Desnoyers [Thu, 7 Jul 2011 15:49:09 +0000 (11:49 -0400)] 
rculfhash test: use per-cpu call-rcu threads

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: update add_unique api
Mathieu Desnoyers [Thu, 7 Jul 2011 15:48:34 +0000 (11:48 -0400)] 
rculfhash: update add_unique api

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: fix add unique
Mathieu Desnoyers [Thu, 7 Jul 2011 15:13:06 +0000 (11:13 -0400)] 
rculfhash: fix add unique

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash test: increases random pool size
Mathieu Desnoyers [Thu, 7 Jul 2011 14:43:51 +0000 (10:43 -0400)] 
rculfhash test: increases random pool size

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: remove hash from nodes
Mathieu Desnoyers [Thu, 7 Jul 2011 14:36:39 +0000 (10:36 -0400)] 
rculfhash: remove hash from nodes

Shrink node size, can get it quickly by reversing the reverse_hash.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: change order of node fields for locality
Mathieu Desnoyers [Thu, 7 Jul 2011 14:24:00 +0000 (10:24 -0400)] 
rculfhash: change order of node fields for locality

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: merge node gc into add loop
Mathieu Desnoyers [Thu, 7 Jul 2011 13:48:44 +0000 (09:48 -0400)] 
rculfhash: merge node gc into add loop

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: cleanup
Mathieu Desnoyers [Thu, 7 Jul 2011 13:43:50 +0000 (09:43 -0400)] 
rculfhash: cleanup

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash test: add nr_leaked count
Mathieu Desnoyers [Thu, 7 Jul 2011 13:20:39 +0000 (09:20 -0400)] 
rculfhash test: add nr_leaked count

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: garbage collection scheme
Mathieu Desnoyers [Thu, 7 Jul 2011 13:09:04 +0000 (09:09 -0400)] 
rculfhash: garbage collection scheme

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: flip order of removal
Mathieu Desnoyers [Wed, 6 Jul 2011 20:05:48 +0000 (16:05 -0400)] 
rculfhash: flip order of removal

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: Remove "value" pointer
Mathieu Desnoyers [Wed, 6 Jul 2011 19:00:14 +0000 (15:00 -0400)] 
rculfhash: Remove "value" pointer

Use container_of instead.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash test: add missing free
Mathieu Desnoyers [Wed, 6 Jul 2011 17:37:19 +0000 (13:37 -0400)] 
rculfhash test: add missing free

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: add unique
Mathieu Desnoyers [Wed, 6 Jul 2011 15:19:08 +0000 (11:19 -0400)] 
rculfhash: add unique

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate resize thresholds
Mathieu Desnoyers [Wed, 6 Jul 2011 14:50:09 +0000 (10:50 -0400)] 
Update resize thresholds

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash updates
Mathieu Desnoyers [Wed, 6 Jul 2011 14:45:04 +0000 (10:45 -0400)] 
rculfhash updates

- Add and remove now completely lock-free (no busy-wait loop).
- Add resize_initiated flag to skip multiple call_rcu calls.
- Identical reverse hashes now only count as one chain entry in the
  chain length accounting. We cannot split identical hashes by growing
  the hash table anyway, so it was leading to large tables uselessly
  when we had a lot of similar hashes.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoComment list behavior wrt lock-freedom
Mathieu Desnoyers [Wed, 6 Jul 2011 05:07:33 +0000 (01:07 -0400)] 
Comment list behavior wrt lock-freedom

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix reverse hash comparison
Mathieu Desnoyers [Wed, 6 Jul 2011 04:52:07 +0000 (00:52 -0400)] 
Fix reverse hash comparison

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: use threshold and target
Mathieu Desnoyers [Wed, 6 Jul 2011 04:44:43 +0000 (00:44 -0400)] 
rculfhash: use threshold and target

Accept to target bucket len greater than 1 to diminish the memory
consumption without too much performance impact.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: implement real hash function
Mathieu Desnoyers [Wed, 6 Jul 2011 03:47:32 +0000 (23:47 -0400)] 
rculfhash: implement real hash function

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agorculfhash: fix resize (use log2 of chain length)
Mathieu Desnoyers [Wed, 6 Jul 2011 02:43:17 +0000 (22:43 -0400)] 
rculfhash: fix resize (use log2 of chain length)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMerge remote branch 'origin/urcu/ht' into urcu/ht
Mathieu Desnoyers [Wed, 6 Jul 2011 01:02:11 +0000 (21:02 -0400)] 
Merge remote branch 'origin/urcu/ht' into urcu/ht

Conflicts:
urcu-ht.h

13 years agorcu lf hash table runtime fixes
Mathieu Desnoyers [Wed, 6 Jul 2011 01:00:42 +0000 (21:00 -0400)] 
rcu lf hash table runtime fixes

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agosplit-ordered hash table
Mathieu Desnoyers [Tue, 5 Jul 2011 23:35:08 +0000 (19:35 -0400)] 
split-ordered hash table

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRename urcu-ht to rculfhash
Mathieu Desnoyers [Sat, 2 Jul 2011 15:31:09 +0000 (11:31 -0400)] 
Rename urcu-ht to rculfhash

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMerge branch 'master' into urcu/ht
Mathieu Desnoyers [Sat, 2 Jul 2011 15:24:18 +0000 (11:24 -0400)] 
Merge branch 'master' into urcu/ht

Conflicts:
Makefile.inc
tests/Makefile.inc
urcu-defer.h

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>
13 years agoRename urcu/urcu_ref.h to urcu/ref.h
Mathieu Desnoyers [Fri, 10 Jun 2011 20:02:31 +0000 (16:02 -0400)] 
Rename urcu/urcu_ref.h to urcu/ref.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoHeaders: move uatomic_*.h to urcu/uatomic/*.h, rename uatomic_arch.h to uatomic.h
Mathieu Desnoyers [Fri, 10 Jun 2011 19:58:34 +0000 (15:58 -0400)] 
Headers: move uatomic_*.h to urcu/uatomic/*.h, rename uatomic_arch.h to uatomic.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoHeaders: move arch_*.h to urcu/arch/*.h
Mathieu Desnoyers [Fri, 10 Jun 2011 19:48:01 +0000 (15:48 -0400)] 
Headers: move arch_*.h to urcu/arch/*.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoHeaders: move *-static.h headers to urcu/static/
Mathieu Desnoyers [Fri, 10 Jun 2011 19:32:31 +0000 (15:32 -0400)] 
Headers: move *-static.h headers to urcu/static/

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoInstall urcu/map/*.h into system
Mathieu Desnoyers [Fri, 10 Jun 2011 19:20:46 +0000 (15:20 -0400)] 
Install urcu/map/*.h into system

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoHeaders: move *-map.h headers to urcu/map/
Mathieu Desnoyers [Fri, 10 Jun 2011 19:16:36 +0000 (15:16 -0400)] 
Headers: move *-map.h headers to urcu/map/

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd library version information
Yannick Brosseau [Fri, 10 Jun 2011 15:35:49 +0000 (11:35 -0400)] 
Add library version information

Following the guidelines from libtool
(http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.htm)
this patch add version information to the distributed libraries.
For the next release, the version will be 1:0:0.
It will need to be updated before each release.

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agolfqueue: update comments, cleanup
Mathieu Desnoyers [Fri, 10 Jun 2011 00:42:26 +0000 (20:42 -0400)] 
lfqueue: update comments, cleanup

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agolfqueue: don't use defer_rcu anymore
Mathieu Desnoyers [Fri, 10 Jun 2011 00:38:17 +0000 (20:38 -0400)] 
lfqueue: don't use defer_rcu anymore

lfqueue now uses call_rcu instead.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoCombine stack and queues info liburcu-cds.so
Mathieu Desnoyers [Fri, 10 Jun 2011 00:33:05 +0000 (20:33 -0400)] 
Combine stack and queues info liburcu-cds.so

Pretty much all libraries use a single .so for their data types. Do the
same here.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agocds containers: lfqueue and lfstack: don't depend on a particular rcu flavor
Mathieu Desnoyers [Fri, 10 Jun 2011 00:31:29 +0000 (20:31 -0400)] 
cds containers: lfqueue and lfstack: don't depend on a particular rcu flavor

Remove rcu_read lock/unlock from the code, require the caller to ensure
protection. First move towards a single .so for all data containers.

This changes the lfqueue API, which is not very much used yet AFAIK.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd missing pkgconfig files to Makefile.am
Yannick Brosseau [Thu, 9 Jun 2011 18:04:48 +0000 (14:04 -0400)] 
Add missing pkgconfig files to Makefile.am

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoarm: remove useless declarations
Paolo Bonzini [Thu, 9 Jun 2011 16:54:38 +0000 (12:54 -0400)] 
arm: remove useless declarations

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agocall_rcu: add back delay in list non-empty case
Mathieu Desnoyers [Thu, 9 Jun 2011 14:50:01 +0000 (10:50 -0400)] 
call_rcu: add back delay in list non-empty case

commit bc94ca9bada25f7403e3e859caa241146ae8e338 changed the !RT behavior
slightly: when the list is not empty, it does not wait for a delay
anymore. Add this delay back, to ensure we don't flood the system with
frequent synchronize_rcu() calls, which would slow down readers.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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 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 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>
This page took 0.046127 seconds and 4 git commands to generate.