Mathieu Desnoyers [Fri, 6 Sep 2013 11:58:28 +0000 (07:58 -0400)]
Version 0.8.0
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 27 Aug 2013 21:58:22 +0000 (17:58 -0400)]
Fix: hash table growth (for small tables) should be limited
Buckets with many entries encountered in a hash table could cause it to
grow to a large size, beyond the scope for which this mechanism is
expected to play a role when node accounting is available. Indeed, when
the hash table grows to larger size, split-counter node accounting is
expected to deal with resize/shrink rather than relying on an heuristic
based on the largest bucket size.
This is fixing an issue where we see hash tables sometimes reaching 65k
entries index (65536*8 = 524288 bytes) for a workload limited to adding
1000 entries and then removing all of them, done in a loop (random
keys).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 26 Aug 2013 15:16:06 +0000 (11:16 -0400)]
Fix: doc/examples cross-build
We need to pass automake's CPPFLAGS and LDFLAGS to examples. Add CFLAGS
too for completeness.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 11 Aug 2013 20:29:27 +0000 (16:29 -0400)]
Introduce URCU_INLINE_SMALL_FUNCTIONS
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 10 Aug 2013 05:29:29 +0000 (01:29 -0400)]
Add missing tests/common/Makefile.am
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 9 Aug 2013 22:19:08 +0000 (18:19 -0400)]
README: document make check/regtest/bench
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 9 Aug 2013 22:13:23 +0000 (18:13 -0400)]
tests: split in check, regtest and bench targets
Allow make check to run without requiring build machines to use hours of
CPU time.
make check: short unit tests
make regtest: long regression tests
make bench: long benchmarks
Fixes #611
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 21 Jul 2013 21:57:31 +0000 (17:57 -0400)]
Cleanup: doc/examples makefile
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 21 Jul 2013 21:34:50 +0000 (17:34 -0400)]
Fix: doc/examples VPATH build
Fixes #568
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Alexandre Montplaisir [Mon, 8 Jul 2013 16:24:30 +0000 (12:24 -0400)]
doc/examples: Move the LIBS after the OBJECTS in the Makefile
Fixes #569.
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 8 Jul 2013 16:22:00 +0000 (12:22 -0400)]
Document build work-around on MacOS X
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 4 Jul 2013 19:23:22 +0000 (15:23 -0400)]
Fix tests: use of uninitialized variables
Were working fine by luck, since they were allocated at the start of
newly spawned test programs. Identified by Coverity.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 26 Jun 2013 21:01:20 +0000 (17:01 -0400)]
test_urcu_hash*: initialize TLS seeds
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 23 Jun 2013 19:03:45 +0000 (15:03 -0400)]
doc/examples: cds_lfht_for_each_entry_duplicate
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 23 Jun 2013 18:56:44 +0000 (14:56 -0400)]
doc/examples: cds_lfht_lookup
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 23 Jun 2013 18:38:10 +0000 (14:38 -0400)]
doc/examples: cds_lfht_destroy
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 23 Jun 2013 18:16:45 +0000 (14:16 -0400)]
doc/examples: cds_lfht_add_replace
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 23 Jun 2013 18:01:01 +0000 (14:01 -0400)]
doc/examples: cds_lfht_add_unique
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 23 Jun 2013 17:40:42 +0000 (13:40 -0400)]
doc/examples: cds_lfht_add/cds_lfht_del
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sun, 23 Jun 2013 15:31:33 +0000 (11:31 -0400)]
doc/examples: add rculfqueue example
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 18:59:35 +0000 (14:59 -0400)]
doc/examples: add synchronize_rcu()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 18:49:06 +0000 (14:49 -0400)]
doc/examples: add bp flavor
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 18:39:12 +0000 (14:39 -0400)]
doc/examples: add dist toplevel makefile
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 18:18:22 +0000 (14:18 -0400)]
doc/examples: add membarrier flavor
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 18:05:10 +0000 (14:05 -0400)]
doc/examples: document call_rcu()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 18:02:30 +0000 (14:02 -0400)]
doc/examples: update qsbr example
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 18:00:39 +0000 (14:00 -0400)]
urcu signal: remove assertion on exit
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 17:34:53 +0000 (13:34 -0400)]
doc/examples: signal flavor
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 17:26:16 +0000 (13:26 -0400)]
doc/examples: add mb flavor
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 17:25:03 +0000 (13:25 -0400)]
doc/examples: update qsbr
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 17:19:36 +0000 (13:19 -0400)]
doc/examples: introduce urcu-flavors examples directory
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 17:13:22 +0000 (13:13 -0400)]
doc/examples: enhance rcu-flavor-qsbr example
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 17:02:46 +0000 (13:02 -0400)]
doc/examples: rename qsbr-minimal to rcu-flavor-qsbr
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 16:08:31 +0000 (12:08 -0400)]
doc/examples: automake stop on error
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 16:06:00 +0000 (12:06 -0400)]
doc/examples: hlist
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 22 Jun 2013 15:50:44 +0000 (11:50 -0400)]
hlist/rcuhlist update
introduce:
- cds_hlist_for_each()
- cds_hlist_for_each_safe()
- CDS_HLIST_HEAD()
- CDS_HLIST_HEAD_INIT()
- cds_hlist_for_each_entry_2() (takes 3 argument, like the Linux kernel
API),
- cds_hlist_for_each_entry_safe_2() (takes 4 arguments, like the Linux
kernel API),
- cds_hlist_for_each_rcu()
- cds_hlist_for_each_entry_rcu_2() (takes 3 arguments, like the Linux
kernel API).
Left cds_hlist_for_each_entry(), cds_hlist_for_each_entry_safe() and
cds_hlist_for_each_entry_rcu() as-is (different from the ones found in
the Linux kernel) because those APIs were already exposed by Userspace
RCU.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 21:45:48 +0000 (17:45 -0400)]
doc/examples: fix typo in list example
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 21:29:42 +0000 (17:29 -0400)]
rcuhlist: make pointer stores atomic
Use rcu_assign_pointer() to store into head->next in
cds_hlist_add_head_rcu(). This includes the write barrier needed before
publishing the new node.
Use CMM_STORE_SHARED() to store into elem->prev->next in
cds_hlist_del_rcu().
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 21:26:09 +0000 (17:26 -0400)]
hlist, rcuhlist: cleanup coding style
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 21:17:32 +0000 (17:17 -0400)]
doc/examples: lfstack
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 20:51:14 +0000 (16:51 -0400)]
doc/examples: update cds_wfs_pop_all_blocking
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 20:46:04 +0000 (16:46 -0400)]
doc/examples: cds_wfs_pop_all_blocking
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 20:31:49 +0000 (16:31 -0400)]
doc/examples: cds_wfs_pop
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 20:21:34 +0000 (16:21 -0400)]
doc/examples: add missing Makefile
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 20:19:01 +0000 (16:19 -0400)]
doc/examples: cds_wfs_push
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 19:57:35 +0000 (15:57 -0400)]
doc/wfcqueue: cds_wfcq_splice
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 19:32:14 +0000 (15:32 -0400)]
doc/examples: add cds_wfcq_dequeue
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 19:31:44 +0000 (15:31 -0400)]
doc/examples: wfcq needs to link against urcu-common
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 19:03:48 +0000 (15:03 -0400)]
doc/examples: update queue comment
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 18:56:44 +0000 (14:56 -0400)]
doc/examples: fix make clean
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 18:54:42 +0000 (14:54 -0400)]
gitignore: add qsbr-minimal
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 18:53:52 +0000 (14:53 -0400)]
doc/examples: cds_wfcq_enqueue
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 18:52:44 +0000 (14:52 -0400)]
doc/examples: Move LIBS to each makefile
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 18:22:32 +0000 (14:22 -0400)]
doc/examples: cds_list_for_each_rcu
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 18:12:54 +0000 (14:12 -0400)]
doc/examples: cds_list_for_each_entry_rcu
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 17:59:09 +0000 (13:59 -0400)]
doc/examples: cds_list_replace_rcu
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 17:43:43 +0000 (13:43 -0400)]
doc/examples: cds_list_add_tail_rcu
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 16:01:06 +0000 (12:01 -0400)]
doc/examples: cds_list_del_rcu
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 15:46:17 +0000 (11:46 -0400)]
doc/examples: cds_list_add_rcu
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 16:51:13 +0000 (12:51 -0400)]
rculist: ensure atomic updates of next pointers
in cds_list_add_rcu, use rcu_assign_pointer to update head->next
atomically and provide the memory barrier before publishing head->next.
Notice that we don't need the wmb() prior to store to prev, because RCU
traversals only go forward, and thus only use "next".
in cds_list_del_rcu, use CMM_STORE_SHARED() to store to elem->prev->next
atomically.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 16:48:18 +0000 (12:48 -0400)]
rculist: implement cds_list_add_tail_rcu
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 21 Jun 2013 16:27:44 +0000 (12:27 -0400)]
rculist.h and list.h style cleanup
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 20 Jun 2013 13:21:03 +0000 (09:21 -0400)]
example makefile: add missing cd ..
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 20 Jun 2013 12:57:57 +0000 (08:57 -0400)]
Update gitignore
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 20 Jun 2013 12:50:33 +0000 (08:50 -0400)]
Fix: examples Makefile on FreeBSD
Support BSD-style make.
Fixes #565
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 19 Jun 2013 14:31:57 +0000 (10:31 -0400)]
hash table test: don't redefine CACHE_LINE_SIZE
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 19 Jun 2013 14:31:09 +0000 (10:31 -0400)]
tests: use thread-id.h wrapper
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 19 Jun 2013 14:30:58 +0000 (10:30 -0400)]
Implement thread-id.h wrapper
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 19 Jun 2013 13:04:55 +0000 (09:04 -0400)]
tests: add missing unsigned long casts to pthread_self()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 14 Jun 2013 22:32:04 +0000 (18:32 -0400)]
Fix: don't build examples in static builds
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 3 Jun 2013 20:18:34 +0000 (16:18 -0400)]
Add QSBR minimal example
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 14 Jun 2013 21:28:07 +0000 (17:28 -0400)]
compiler.h: implement CAA_ARRAY_SIZE()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 14 Jun 2013 12:30:21 +0000 (08:30 -0400)]
document rcu barrier
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 14 Jun 2013 12:22:50 +0000 (08:22 -0400)]
rcu barrier: handle OOM die urcu_die
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 31 May 2013 15:32:16 +0000 (11:32 -0400)]
Implement rcu_barrier()
Awaits for all in-flight call_rcu handlers to complete execution before
returning.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 14 Jun 2013 12:15:21 +0000 (08:15 -0400)]
rculfhash: document destroy context limitations
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 11 Jun 2013 15:18:52 +0000 (11:18 -0400)]
Add MIPS to README
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 8 Jun 2013 12:24:23 +0000 (08:24 -0400)]
Update README
Detail i386/amd64 as tested for FreeBSD.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Sat, 8 Jun 2013 11:57:57 +0000 (07:57 -0400)]
Update README testing info about FreeBSD
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 15 May 2013 14:29:44 +0000 (16:29 +0200)]
test: fix api.h missing if brackets
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 15 May 2013 14:26:57 +0000 (16:26 +0200)]
tests: fix incorrect counter
- not initialized to 0 in 2 tests,
- within inner loop in 3rd test, thus always 0.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 8 May 2013 13:53:45 +0000 (09:53 -0400)]
Fix: membarrier fallback symbol conflict
* Lai Jiangshan (laijs@cn.fujitsu.com) wrote:
> Hi, Mathieu,
>
> There is a big compatible problem in URCU which should be fix in next round.
>
> LB: liburcu built on the system which has sys_membarrier().
> LU: liburcu built on the system which does NOT have sys_membarrier().
>
> LBM: liburcu-mb ....
> LUM: liburcu-mb ...
>
> AB: application(-lliburcu) built on the system which has sys_membarrier().
> AU: application(-lliburcu) built on the system which does NOT have
> sys_membarrier().
>
> ABM application(-lliburcu-mb) ...
> AUM application(-lliburcu-mb) ...
>
> AB/AU + LB/LU: 4 combinations
> ABM/AUM + LBM/LUM: 4 combinations
>
> I remember some of the 8 combinations can't works due to symbols are
> miss match. only LU+AB and LB+AU ?
>
> could you check it?
>
> How to fix it: In LU and AU, keep all the symbol name/ABI as LA and
> AB, but only the behaviors falls back to URCU_MB.
Define membarrier() as -ENOSYS when SYS_membarrier is not found in the
system headers. Check dynamically for membarrier availability to ensure
ABI compatibility between applications and librairies.
Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Fri, 10 May 2013 11:30:18 +0000 (07:30 -0400)]
Fix: Use a filled signal mask to disable all signals
Changelog from David Pelton's original patch:
While using lttng-ust with an application that was calling fork()
with pending signals, I found that all signals were getting unmasked
shortly before the underlying call to fork(). After some
investigation, I found that the rcu_bp_before_fork() function was
unmasking all signals. Based on the comments for this function, it
should be masking all signals. Inspection of the rest of the code
in urcu-bp.c revealed the same pattern in two other functions.
This patch changes the code to use a filled signal mask to disable
all signals. The change to rcu_bp_before_fork() addressed the
problem I was seeing while using lttng-ust. The changes to the
other two functions appear to fix other instances of the same
problem.
Updates by Mathieu Desnoyers:
- Use SIG_BLOCK instead of SIG_SETMASK when setting a filled mask. This
has the same behavior in this case (since we're blocking all signals),
but is semantically neater: if we ever some signals from that mask,
we'd like to to a union with the signal mask already blocked by the
application.
- Also fix incorrect signal masking in compat_arch_x86.c.
Reported-by: David Pelton <dpelton@ciena.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 6 May 2013 14:30:57 +0000 (10:30 -0400)]
urcu-bp: introduce struct urcu_gp
Make urcu-bp similar to urcu-qsbr and other urcu flavors.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 6 May 2013 14:24:14 +0000 (10:24 -0400)]
Fix: struct urcu_gp broke multiflavor
Add mapping to namespace urcu_gp.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 6 May 2013 14:03:55 +0000 (10:03 -0400)]
Cleanup test usage printout
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 6 May 2013 13:35:42 +0000 (09:35 -0400)]
wfstack tests: use pop "last" state info
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 6 May 2013 13:35:07 +0000 (09:35 -0400)]
wfstack: return whether pop is popping the last element
Newly introduced "with_state" pop API members return stack state
atomically sampled with the pop operation.
Allow testing behavior of pop with respect to number of push-to-empty
and pop-all-from-non-empty.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 6 May 2013 13:34:00 +0000 (09:34 -0400)]
wfcqueue tests: use dequeue empty state
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Mon, 6 May 2013 13:33:36 +0000 (09:33 -0400)]
wfcqueue: return whether dequeue is dequeuing last element
Newly introduced "with_state" dequeue API members return queue state
atomically sampled with the dequeue operation.
Allow testing behavior of dequeue with respect to number of
enqueue-to-empty and splice-from-non-empty.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Mon, 6 May 2013 12:42:27 +0000 (08:42 -0400)]
urcu: avoid false sharing for rcu_gp_ctr
@rcu_gp_ctr and @registry share the same cache line, it causes
false sharing and slowdown both of the read site and update site.
Fix: Use different cache line for them.
Although rcu_gp_futex is updated less than rcu_gp_ctr, but
they always be accessed at almost the same time, so we also move rcu_gp_futex
to the cacheline of rcu_gp_ctr to reduce the cacheline-usage or cache-missing
of read site.
test: (4X6=24 CPUs)
Before patch:
[root@localhost userspace-rcu]# ./tests/test_urcu_mb 20 1 20
SUMMARY ./tests/test_urcu_mb testdur 20 nr_readers 20 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads
2100285330 nr_writes
3390219 nr_ops
2103675549
[root@localhost userspace-rcu]# ./tests/test_urcu_mb 20 1 20
SUMMARY ./tests/test_urcu_mb testdur 20 nr_readers 20 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads
1619868562 nr_writes
3529478 nr_ops
1623398040
[root@localhost userspace-rcu]# ./tests/test_urcu_mb 20 1 20
SUMMARY ./tests/test_urcu_mb testdur 20 nr_readers 20 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads
1949067038 nr_writes
3469334 nr_ops
1952536372
after patch:
[root@localhost userspace-rcu]# ./tests/test_urcu_mb 20 1 20
SUMMARY ./tests/test_urcu_mb testdur 20 nr_readers 20 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads
3380191848 nr_writes
4903248 nr_ops
3385095096
[root@localhost userspace-rcu]# ./tests/test_urcu_mb 20 1 20
SUMMARY ./tests/test_urcu_mb testdur 20 nr_readers 20 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads
3397637486 nr_writes
4129809 nr_ops
3401767295
Singed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Lai Jiangshan [Mon, 6 May 2013 12:32:02 +0000 (08:32 -0400)]
urcu: make the code of urcu-qsbr as normal urcu
urcu-qsbr's read site's quiescence is much longer than normal urcu ==>
synchronize_rcu() is much slower ==>
rcu_gp_ctr is updated much less ==>
the whole urcu-qsbr will not be slowed down by false sharing of rcu_gp_ctr.
But this patch makes sense to keep the code of urcu-qsbr like normal urcu,
better readability and maintenance.
Test: (4*6 CPUs)
Before patch:
[root@localhost userspace-rcu]# ./tests/test_urcu_qsbr 20 1 20
SUMMARY ./tests/test_urcu_qsbr testdur 20 nr_readers 20 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads
65498297587 nr_writes
2000665 nr_ops
65500298252
[root@localhost userspace-rcu]# ./tests/test_urcu_qsbr 20 1 20
SUMMARY ./tests/test_urcu_qsbr testdur 20 nr_readers 20 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads
67218079467 nr_writes
1981593 nr_ops
67220061060
After patch
./tests/test_urcu_qsbr 20 1 20
SUMMARY ./tests/test_urcu_qsbr testdur 20 nr_readers 20 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads
67473798999 nr_writes
1999151 nr_ops
67475798150
[root@localhost userspace-rcu]# ./tests/test_urcu_qsbr 20 1 20
SUMMARY ./tests/test_urcu_qsbr testdur 20 nr_readers 20 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads
67065521397 nr_writes
1993956 nr_ops
67067515353
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 30 Apr 2013 01:30:17 +0000 (21:30 -0400)]
rculfhash: detect if resize/destroy are called within RCU read-side C.S.
Report errors.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 30 Apr 2013 00:48:40 +0000 (20:48 -0400)]
Documentation: rculfhash: cds_lfht_resize not within read-side C.S.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 30 Apr 2013 00:28:10 +0000 (20:28 -0400)]
fix: rculfhash don't change qsbr online state
resize and destroy should not change the QSBR online state. Use the new
rcu_read_ongoing() API for this.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 30 Apr 2013 00:17:22 +0000 (20:17 -0400)]
Add rcu_read_ongoing() API to each urcu flavor
This will allow checking whether:
- thread is online (QSBR),
- thread is nested within read-side critical section (other flavors),
This is useful for libraries that need to know if QSBR is online in
order to save the original state temporarily so it can be restored
before returning to the caller.
Eventually, this API can be called by a "debugging" implementation of
rcu_dereference() and other urcu-pointer.h API members to check that no
RCU pointer is read outside of RCU read-side critical sections.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 17 Apr 2013 21:26:05 +0000 (17:26 -0400)]
Add "sparc" host cpu to configure.ac
Some sparc Debian setups advertise a "sparc" host cpu (rather than
sparc64).
In all cases, I think it should be safe to add a "sparc" entry to
userspace RCU configure.ac upstream, e.g.
[sparc], [ARCHTYPE="sparc64"],
in the event someone would launch the build on an environment not
supporting sparc v9, the build would fail because the 32-bit compiler
would not be able to generate sparc v9 instructions (unless
explicitely instructed to do so by the -m32 -Wa,-Av9a flags).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Tue, 16 Apr 2013 17:09:02 +0000 (13:09 -0400)]
futex: include syscall.h instead of sys/syscall.h
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Paul E. McKenney [Thu, 14 Mar 2013 15:22:23 +0000 (11:22 -0400)]
Add tab to output in order to allow easy nesting of tables.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 14 Mar 2013 14:32:13 +0000 (10:32 -0400)]
Remove urcu-api-list.sh from dist tarball
It needs to be run in the git repository.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.041194 seconds and 4 git commands to generate.