lp:~lttng/urcu/trunk

Created by Ubuntu LTTng on 2011-05-11 and last modified on 2020-11-20
Get this branch:
bzr branch lp:~lttng/urcu/trunk

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Ubuntu LTTng
Project:
Userspace RCU
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at git://git.lttng.org/userspace-rcu.git.

The next import is scheduled to run in 4 hours.

Last successful import was 1 hour ago.

Import started 1 hour ago on alnitak and finished 1 hour ago taking 20 seconds — see the log
Import started 7 hours ago on alnitak and finished 7 hours ago taking 20 seconds — see the log
Import started 14 hours ago on alnitak and finished 14 hours ago taking 15 seconds — see the log
Import started 20 hours ago on alnitak and finished 20 hours ago taking 15 seconds — see the log
Import started on 2020-11-28 on alnitak and finished on 2020-11-28 taking 15 seconds — see the log
Import started on 2020-11-27 on alnitak and finished on 2020-11-27 taking 20 seconds — see the log
Import started on 2020-11-27 on alnitak and finished on 2020-11-27 taking 20 seconds — see the log
Import started on 2020-11-27 on alnitak and finished on 2020-11-27 taking 15 seconds — see the log
Import started on 2020-11-27 on alnitak and finished on 2020-11-27 taking 15 seconds — see the log
Import started on 2020-11-26 on alnitak and finished on 2020-11-26 taking 20 seconds — see the log

Recent revisions

1300. By Michael Jeanson <email address hidden> on 2020-11-20

Compile time futex syscall detection

The futex syscall availability is detected at configure time using a
simple compile test. Replace this with compile time detection using the
same test. This would allow sharing headers in a multi-arch environment
and reduce the build system complexity.

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

1299. By Michael Jeanson <email address hidden> on 2020-11-20

Static arch and uatomic headers

Replace the somewhat hackish symlinking of architecture specific headers
at configure time with compile time detection using compiler defines.
This would allow sharing headers in a multi-arch environment and reduce
the build system complexity.

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

1298. By Michael Jeanson <email address hidden> on 2020-11-19

Add git-review config

Add .gitreview for contributors wishing to use gerrit for patch
reviews.

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

1297. By Michael Jeanson <email address hidden> on 2020-11-17

cleanup: Improve wording of CONFIG_RCU_DEBUG description

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

1296. By Michael Jeanson <email address hidden> on 2020-11-17

fix: explicitly include urcu/config.h in files using CONFIG_RCU_ defines

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

1295. By Shuo Wang <email address hidden> on 2020-11-16

Fix typo in README.md

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

1294. By Michael Jeanson <email address hidden> on 2020-11-02

fix: add -lurcu-common to pkg-config libs for each flavor

The urcu-common library contains common code like the write-free queue
and compat code, each urcu flavor library is dynamicly linked with it.

Most but not all toolchains will automatically link an executable with a
transitive depency of an explicitly linked library if said binary uses a
symbol from the transitive dependency.

Since this behavior is not present in all toolchains, add
'-lurcu-common' to the 'Libs' field of each flavors pkg-config file so
that executables using symbols from urcu-common can be reliably linked
using pkg-config.

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

1293. By Paul E. McKenney <email address hidden> on 2020-10-26

call_rcu: Fix race between rcu_barrier() and call_rcu_data_free()

The current code can lose RCU callbacks at shutdown time, which can
result in hangs. This lossage can happen as follows:

o A thread invokes call_rcu_data_free(), which executes up through
        the wake_call_rcu_thread(). At this point, the call_rcu_data
        structure has been drained of callbacks, but is still on the
        call_rcu_data_list. Note that this thread does not hold the
        call_rcu_mutex.

o Another thread invokes rcu_barrier(), which traverses the
        call_rcu_data_list under the protection of call_rcu_mutex,
        a list which still includes the above newly drained structure.
        This thread therefore adds a callback to the newly drained
        call_rcu_data structure. It then releases call_rcu_mutex and
        enters a mystifying loop that does futex stuff.

o The first thread finishes executing call_rcu_data_free(),
        which acquires call_rcu_mutex just long enough to remove the
        newly drained call_rcu_data structure from call_rcu_data_list.
        Which causes one of the rcu_barrier() invocation's callbacks to
        be leaked.

o The second thread's rcu_barrier() invocation never returns
        resulting in a hang.

This commit therefore changes call_rcu_data_free() to acquire
call_rcu_mutex before checking the call_rcu_data structure for callbacks.
In the case where there are no callbacks, call_rcu_mutex is held across
both the check and the removal from call_rcu_data_list, thus preventing
rcu_barrier() from adding a callback in the meantime. In the case where
there are callbacks, call_rcu_mutex must be momentarily dropped across
the call to get_default_call_rcu_data(), which can itself acquire
call_rcu_mutex. This momentary drop is not a problem because any
callbacks that rcu_barrier() might queue during that period of time will
be moved to the default call_rcu_data structure, and the lock will be
held across the full time including moving those callbacks and removing
the call_rcu_data structure that was passed into call_rcu_data_free()
from call_rcu_data_list.

With this fix, a several-hundred-CPU test successfully completes more
than 5,000 executions. Without this fix, it fails within a few tens
of executions. Although the failures happen more quickly on larger
systems, in theory this could happen on a single-CPU system, courtesy
of preemption.

Signed-off-by: Paul E. McKenney <email address hidden>
Cc: Mathieu Desnoyers <email address hidden>
Cc: Stephen Hemminger <email address hidden>
Cc: Alan Stern <email address hidden>
Cc: Lai Jiangshan <email address hidden>
Cc: <email address hidden>
Cc: <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

1292. By Mathieu Desnoyers on 2020-04-21

Cleanup: tls-compat.h: add parentheses around expression (coding style)

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

1291. By Mathieu Desnoyers on 2020-04-20

Fix: tls-compat.h exposes compiler-dependent public configuration

Exposing the storage class chosen by ax_tls.m4 in a public header is
a bad idea, because if a recent gcc is used when configuring
liburcu, thus detecting C11, it will choose _Thread_local. Then, if an
external project uses urcu/tls-compat.h with an older gcc (e.g. 4.8),
it will fail to build, because that storage class is unknown, and
__thread should be used instead.

Therefore, use a preprocessor conditional on __cplusplus to detect C++11
(and use thread_local). Else, the STDC version is used to select
_Thread_local. Else check if _MSC_VER is defined to select
__declspec(thread), or else rely on __thread as fallback.

Remove ax_tls.m4 because it is now unused.

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

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers