urcu:urcu/rcuja-range

Last commit made on 2015-05-04
Get this branch:
git clone -b urcu/rcuja-range https://git.launchpad.net/urcu

Branch merges

Branch information

Name:
urcu/rcuja-range
Repository:
lp:urcu

Recent commits

1badda4... by Mathieu Desnoyers

Fix: rcuja merge fixes

Signed-off-by: Mathieu Desnoyers <email address hidden>

169e102... by Mathieu Desnoyers

Merge branch 'master' into urcu/rcuja-range-merge

Signed-off-by: Mathieu Desnoyers <email address hidden>

731ccb9... by Mathieu Desnoyers

Fix: deadlock when thread join is issued in read-side C.S.

The transitive dependency between:

RCU read-side C.S. -> synchronize_rcu -> rcu_gp_lock -> rcu_register_thread

and the dependency:

pthread_join -> awaiting for thread completion

Can block a thread on join, and thus have the side-effect of deadlocking
a thread doing a pthread_join while within a RCU read-side critical
section. This join would be awaiting for completion of register_thread or
rcu_unregister_thread, which may never complete because the rcu_gp_lock
is held by synchronize_rcu executed from another thread.

One solution to fix this is to add a new lock, rcu_registry_lock. This
lock now protects the thread registry. It is released between iterations
on the registry by synchronize_rcu, thus allowing thread
registration/unregistration to complete even though synchronize_rcu is
awaiting for RCU read-side critical sections to complete.

Signed-off-by: Mathieu Desnoyers <email address hidden>
Reviewed-by: Paul E. McKenney <email address hidden>
CC: Eugene Ivanov <email address hidden>
CC: Lai Jiangshan <email address hidden>
CC: Stephen Hemminger <email address hidden>

14740b1... by Mathieu Desnoyers

Fix: rename RCU_DEBUG to DEBUG_RCU in urcu-qsbr.h

Keep a mapping allowing to define RCU_DEBUG within urcu-qsbr.h for
compatibility purposes.

Signed-off-by: Mathieu Desnoyers <email address hidden>

e1789ce... by Mathieu Desnoyers

Cleanup some c99 pedantic warnings

Signed-off-by: Mathieu Desnoyers <email address hidden>

1b85da8... by Luca Boccassi <email address hidden>

Mark braced-groups within expressions with __extension__

Braced-groups within expressions are not valid ISO C, so
if a macro uses them and it's included in a project built
with -pedantic, the build will fail. GCC and CLANG do
support them as extension, so marking them as such allows
the build to complete even with -pedantic.

Signed-off-by: Luca Boccassi <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

db21eff... by Mathieu Desnoyers

Fix: compat_futex_noasync race condition

The Userspace RCU compatibility layer around sys_futex has a race
condition which makes pretty much all "benchmark" tests hang pretty
quickly on non-Linux systems (tested on Mac OS X).

I narrowed it down to a bug in compat_futex_noasync: this compat layer
uses a single pthread mutex and condition variable for all callers,
independently of their uaddr. The FUTEX_WAKE performs a pthread cond
broadcast to all waiters. FUTEX_WAIT must then compare *uaddr with val
to see which thread has been awakened.

Unfortunately, the check was not done again after each return from
pthread_cond_wait(), thus causing the race.

This race affects threads using the futex_noasync() compatibility layer
concurrently, thus it affects only on non-Linux systems.

Signed-off-by: Mathieu Desnoyers <email address hidden>

8d11f7c... by Mathieu Desnoyers

tests: Use stderr redirection for time output

Allows using Mac OS X time command in tests.

Signed-off-by: Mathieu Desnoyers <email address hidden>

1f2b013... by Mathieu Desnoyers

Fix: use space after rpath for OS X ld

Signed-off-by: Mathieu Desnoyers <email address hidden>

5135c0f... by Mathieu Desnoyers

Fix: move transparent union attribute after union declaration for clang

Signed-off-by: Mathieu Desnoyers <email address hidden>