urcu:master

Last commit made on 2018-03-23
Get this branch:
git clone -b master https://git.launchpad.net/urcu

Branch merges

Branch information

Name:
master
Repository:
lp:urcu

Recent commits

fdfad81... by Michael Jeanson <email address hidden> on 2018-03-21

Add support for the RISC-V architecture

Tested in QEMU 2.12.0-rc0, requires --disable-compiler-tls to go
through the benchmarks reliably.

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

4b2d70a... by Michael Jeanson <email address hidden> on 2018-02-20

Tests: Add tap-driver.sh for automake < 1.12

Add the tap-driver.sh script in the aux directory to enable
systems with an automake version prior to 1.12 to bootstrap
the source tree from git.

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

03c5782... by Michael Jeanson <email address hidden> on 2017-12-08

Tests: Replace prove by autotools tap runner

This patch removes the dependency on the prove perl script
to run the TAP test suite. It replaces it with the autotools
shell TAP driver that only requires a shell and awk.

Custom arguments can be passed to the test runner with
env variables as follow:

  env LOG_DRIVER_FLAGS='--comments --ignore-exit' \
      TESTS='foo.test baz.test' make -e check

This tap driver also creates a log file for each test that
can then be used by another system to build a test report.

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

3745305... by Mathieu Desnoyers on 2017-12-22

liburcu-bp: Use membarrier private expedited when available

For the liburcu-bp flavor, use the membarrier private expedited command
when available. It is faster than the shared expedited command, but has
only been introduced in 4.14 Linux kernels.

When configured with --disable-sys-membarrier-fallback, liburcu-bp
will abort if running on a kernel that do not provide the membarrier
private expedited command (e.g. CONFIG_MEMBARRIER=n or kernel version
below 4.14).

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

c0bb9f6... by Mathieu Desnoyers on 2017-12-21

liburcu: Use membarrier private expedited when available

For the liburcu flavor, use the membarrier private expedited
command when available. It is faster than the shared expedited
command, but has only been introduced in 4.14 Linux kernels.

When configured with --disable-sys-membarrier-fallback, liburcu
will abort if running on a kernel that provide neither the shared
nor the private expedited membarrier commands. This is the case
if running on a CONFIG_MEMBARRIER=n kernel, or a kernel version
below 4.3.

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

6ef9090... by Mathieu Desnoyers on 2017-11-07

rculfhash: improve error handling of mmap backend

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

142af0f... by Michael Jeanson <email address hidden> on 2017-07-28

Fix: don't use overlapping mmap mappings on Cygwin

The allocation scheme used by the mmap based RCU hash table is to make a
large unaccessible mapping to reserve memory without allocating it.
Then smaller chunks are allocated by overlapping read/write mappings which
do allocate memory. Deallocation is done by an overlapping unaccessible
mapping.

This scheme was tested on Linux, macOS and Solaris. However, on Cygwin the
mmap wrapper is based on the Windows NtMapViewOfSection API which doesn't
support overlapping mappings.

An alternative to the overlapping mappings is to use mprotect to change the
protection on chunks of the large mapping, read/write to allocate and none
to deallocate. This works perfecty on Cygwin and Solaris but on Linux a
call to madvise is also required to deallocate and it just doesn't work on
macOS.

For this reason, we keep to original scheme on all platforms except Cygwin.

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

748f9af... by Michael Jeanson <email address hidden> on 2017-07-26

Tests fix: errors in shell scripts

Fix all shellcheck errors in the test scripts, switch to posix
compatible syntax. Remove duplicated code already included in common.sh.
Call the tap.sh cleanup code from our exit trap instead of overriding
it.

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

2f66186... by Mathieu Desnoyers on 2017-11-07

Revert "Use initial-exec tls model"

This reverts commit 6fd172f599e8d798e68974a786dd930d876f182e.

The initial-exec model seems to behave differently than global-dynamic
with respect to lazy initialization, causing locks to be taken then
first time each thread touch the TLS. This introduces deadlocks
with library constructors waiting on other threads.

This will require further investigation.

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

6fd172f... by Mathieu Desnoyers on 2017-10-18

Use initial-exec tls model

The initial-exec tls model removes requirement on performing memory
allocation the first time a tls variable is touched by any given thread.
This is needed to ensure usage of the TLS from a signal handler works
fine.

Given that the link-editor figures out the right model to use at
runtime, we can change the tls model without changing the soname major
version.

This also brings interesting speedups over the GD model. This does not
affects TLS accesses performed by executables, but does affect TLS
accesses performed by libraries.

* Executable (no change)

./test_urcu 1 0 10
SUMMARY /media/truecrypt1/compudj/doc/userspace-rcu/tests/benchmark/.libs/test_urcu testdur 10 nr_readers 1 rdur 0 wdur 0 nr_writers 0 wdelay 0 nr_reads 4420328692 nr_writes 0 nr_ops 4420328692

(with initial-exec)
./test_urcu 1 0 10
SUMMARY /media/truecrypt1/compudj/doc/userspace-rcu/tests/benchmark/.libs/test_urcu testdur 10 nr_readers 1 rdur 0 wdur 0 nr_writers 0 wdelay 0 nr_reads 4424925864 nr_writes 0 nr_ops 4424925864

* Library

(with global-dynamic)
./test_urcu_dynamic_link 1 0 10
SUMMARY /media/truecrypt1/compudj/doc/userspace-rcu/tests/benchmark/.libs/test_urcu_dynamic_link testdur 10 nr_readers 1 rdur 0 wdur 0 nr_writers 0 wdelay 0 nr_reads 573209491 nr_writes 0 nr_ops 573209491

(with initial-exec)
./test_urcu_dynamic_link 1 0 10
SUMMARY /media/truecrypt1/compudj/doc/userspace-rcu/tests/benchmark/.libs/test_urcu_dynamic_link testdur 10 nr_readers 1 rdur 0 wdur 0 nr_writers 0 wdelay 0 nr_reads 1088836185 nr_writes 0 nr_ops 1088836185

Link: https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter8-20.html
Link: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#Common-Variable-Attributes
Signed-off-by: Mathieu Desnoyers <email address hidden>