Re: [lttng-dev] [rp] [RFC PATCH] RCU lock-free hash table: implement cds_lfht_is_node_deleted()

2012-02-21 Thread Paul E. McKenney
was that the user can do this with a flag, but it does seem to make sense to leverage the pointer markings that you carrry! Acked-by: Paul E. McKenney paul...@linux.vnet.ibm.com Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com CC: Lai Jiangshan la...@cn.fujitsu.com CC: Paul E. McKenney

Re: [lttng-dev] [rp] [commit] rculfhash: document linearizability guarantees

2012-04-19 Thread Paul E. McKenney
On Thu, Apr 19, 2012 at 08:02:57PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Wed, Apr 18, 2012 at 04:10:17PM -0400, Mathieu Desnoyers wrote: Hi, FYI, I pushed extra documentation of the RCU lock-free Hash Table found in userspace RCU

Re: [lttng-dev] [rp] [commit] rculfhash: document linearizability guarantees

2012-04-23 Thread Paul E. McKenney
On Mon, Apr 23, 2012 at 03:17:45PM -0400, Mathieu Desnoyers wrote: Hi Paul, * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Thu, Apr 19, 2012 at 08:02:57PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Wed, Apr 18, 2012 at 04:10

Re: [lttng-dev] [rp] rculfhash ordering guarantees

2012-04-23 Thread Paul E. McKenney
On Mon, Apr 23, 2012 at 03:45:32PM -0400, Mathieu Desnoyers wrote: Hi Paul, Here is the updated text I plan for the next update. Comments are welcome, thanks ! Looks much improved! The inevitable questions and comments interspersed.

Re: [lttng-dev] [rp] rculfhash ordering guarantees

2012-04-23 Thread Paul E. McKenney
On Mon, Apr 23, 2012 at 10:54:54PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Mon, Apr 23, 2012 at 03:45:32PM -0400, Mathieu Desnoyers wrote: Hi Paul, Here is the updated text I plan for the next update. Comments are welcome, thanks

Re: [lttng-dev] [rp] [RFC] Readiness for URCU release with RCU lock-free hash table

2012-05-01 Thread Paul E. McKenney
On Tue, May 01, 2012 at 11:12:15AM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, May 01, 2012 at 10:16:09AM -0400, Mathieu Desnoyers wrote: Hi! After 1 year of development, with the last 6-7 months spent polishing the API and testing

Re: [lttng-dev] [rp] [RFC] Readiness for URCU release with RCU lock-free hash table

2012-05-01 Thread Paul E. McKenney
On Tue, May 01, 2012 at 11:21:44AM -0400, Mathieu Desnoyers wrote: * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, May 01, 2012 at 10:16:09AM -0400, Mathieu Desnoyers wrote: Hi! After 1 year

Re: [lttng-dev] [rp] [RFC] Readiness for URCU release with RCU lock-free hash table

2012-05-01 Thread Paul E. McKenney
On Tue, May 01, 2012 at 01:41:36PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, May 01, 2012 at 11:21:44AM -0400, Mathieu Desnoyers wrote: * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: * Paul E. McKenney (paul

Re: [lttng-dev] [rp] [RFC] Readiness for URCU release with RCU lock-free hash table

2012-05-01 Thread Paul E. McKenney
On Tue, May 01, 2012 at 05:02:06PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, May 01, 2012 at 01:41:36PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, May 01, 2012 at 11:21:44AM -0400

Re: [lttng-dev] [rp] [RFC] Readiness for URCU release with RCU lock-free hash table

2012-05-02 Thread Paul E. McKenney
On Wed, May 02, 2012 at 12:16:39AM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, May 01, 2012 at 05:02:06PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, May 01, 2012 at 01:41:36PM -0400

Re: [lttng-dev] [rp] [RFC] Readiness for URCU release with RCU lock-free hash table

2012-05-03 Thread Paul E. McKenney
On Thu, May 03, 2012 at 01:13:30PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Wed, May 02, 2012 at 12:16:39AM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, May 01, 2012 at 05:02:06PM -0400

Re: [lttng-dev] [rp] [RFC] Readiness for URCU release with RCU lock-free hash table

2012-05-04 Thread Paul E. McKenney
On Fri, May 04, 2012 at 12:53:12PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Thu, May 03, 2012 at 01:13:30PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: [...] A write barrier would

Re: [lttng-dev] [rp] [RFC] Readiness for URCU release with RCU lock-free hash table

2012-05-08 Thread Paul E. McKenney
On Mon, May 07, 2012 at 12:10:55PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Fri, May 04, 2012 at 12:53:12PM -0400, Mathieu Desnoyers wrote: [...] Just to make sure I understand -- the reason that the del functions say no memory barrier

Re: [lttng-dev] [rp] [RFC] Readiness for URCU release with RCU lock-free hash table

2012-05-08 Thread Paul E. McKenney
On Tue, May 08, 2012 at 02:48:27PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Mon, May 07, 2012 at 12:10:55PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Fri, May 04, 2012 at 12:53:12PM -0400

Re: [lttng-dev] [rp] [RFC PATCH urcu] document concurrent data structures

2012-05-14 Thread Paul E. McKenney
On Mon, May 14, 2012 at 11:36:04PM -0400, Mathieu Desnoyers wrote: Document the concurrent data structures provided by the userspace RCU library. Looks good to me! Reviewed-by: Paul E. McKenney paul...@linux.vnet.ibm.com Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com

Re: [lttng-dev] [RFC PATCH urcu] Document uatomic operations

2012-05-16 Thread Paul E. McKenney
On Tue, May 15, 2012 at 08:10:03AM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Mon, May 14, 2012 at 10:39:01PM -0400, Mathieu Desnoyers wrote: Document each atomic operation provided by urcu/uatomic.h, along with their memory barrier

Re: [lttng-dev] [RFC PATCH urcu] Implement urcu/tls-compat.h

2012-05-16 Thread Paul E. McKenney
On Wed, May 16, 2012 at 09:56:58AM -0400, Mathieu Desnoyers wrote: Suggested-by: Marek Vavruša marek.vavr...@nic.cz Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com Interesting! Jeffrey Yasskin of Google was suggesting use of pthread_get_specific() over __thread even where

Re: [lttng-dev] [rp] [RFC PATCH urcu] Document uatomic operations

2012-05-16 Thread Paul E. McKenney
On Wed, May 16, 2012 at 02:17:42PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, May 15, 2012 at 08:10:03AM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Mon, May 14, 2012 at 10:39:01PM -0400

Re: [lttng-dev] [rp] [RFC PATCH urcu] Document uatomic operations

2012-05-16 Thread Paul E. McKenney
On Wed, May 16, 2012 at 11:45:39AM -0700, Josh Triplett wrote: On Wed, May 16, 2012 at 11:32:38AM -0700, Paul E. McKenney wrote: On Wed, May 16, 2012 at 02:17:42PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, May 15, 2012 at 08:10:03AM

Re: [lttng-dev] [rp] [RFC PATCH urcu] Document uatomic operations

2012-05-17 Thread Paul E. McKenney
On Thu, May 17, 2012 at 06:04:13PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Thu, May 17, 2012 at 01:59:43PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Wed, May 16, 2012 at 11:45:39AM -0700

Re: [lttng-dev] [RFC] Userspace RCU library internal error handling

2012-06-21 Thread Paul E. McKenney
On Thu, Jun 21, 2012 at 12:41:13PM -0400, Mathieu Desnoyers wrote: Hi, Currently, liburcu calls exit(-1) upon internal consistency error. This is not pretty, and usually frowned upon in libraries. One example of failure path where we use this is if pthread_mutex_lock() would happen to

Re: [lttng-dev] [PATCH 2/2] urcu: new wfqueue implementation

2012-08-10 Thread Paul E. McKenney
{ /* * Queue with wait-free enqueue/blocking dequeue. - * This implementation adds a dummy head node when the queue is empty to ensure - * we can always update the queue locklessly. * * Inspired from half-wait-free/half-blocking queue implementation done by * Paul E. McKenney. @@ -57,31

[lttng-dev] [PATCH] Ensure that read-side functions meet 10-line LGPL criterion

2012-09-01 Thread Paul E. McKenney
This commit ensures that all read-side functions meet the 10-line LGPL criterion that permits them to be expanded directly into non-LGPL code, without function-call instructions. It also documents this as the intent. Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com diff --git a/urcu

Re: [lttng-dev] [rp] [PATCH] Ensure that read-side functions meet 10-line LGPL criterion

2012-09-02 Thread Paul E. McKenney
On Sat, Sep 01, 2012 at 10:13:55PM -0700, Josh Triplett wrote: On Sat, Sep 01, 2012 at 05:59:11PM -0700, Paul E. McKenney wrote: This commit ensures that all read-side functions meet the 10-line LGPL criterion that permits them to be expanded directly into non-LGPL code, without function

Re: [lttng-dev] [PATCH] Ensure that read-side functions meet 10-line LGPL criterion

2012-09-04 Thread Paul E. McKenney
On Mon, Sep 03, 2012 at 02:03:00PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: This commit ensures that all read-side functions meet the 10-line LGPL criterion that permits them to be expanded directly into non-LGPL code, without function-call

Re: [lttng-dev] [rp] [URCU PATCH 0/3] wait-free concurrent queues (wfcqueue)

2012-10-03 Thread Paul E. McKenney
On Tue, Oct 02, 2012 at 10:13:07AM -0400, Mathieu Desnoyers wrote: Implement wait-free concurrent queues, with a new API different from wfqueue.h, which is already provided by Userspace RCU. The advantage of splitting the head and tail objects of the queue into different arguments is to allow

Re: [lttng-dev] [rp] [URCU PATCH 0/3] wait-free concurrent queues (wfcqueue)

2012-10-04 Thread Paul E. McKenney
On Wed, Oct 03, 2012 at 05:04:36PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Tue, Oct 02, 2012 at 10:13:07AM -0400, Mathieu Desnoyers wrote: Implement wait-free concurrent queues, with a new API different from wfqueue.h, which is already

Re: [lttng-dev] [URCU PATCH 3/3] call_rcu: use wfcqueue, eliminate false-sharing

2012-10-08 Thread Paul E. McKenney
On Mon, Oct 08, 2012 at 10:49:16AM -0400, Mathieu Desnoyers wrote: * Lai Jiangshan (la...@cn.fujitsu.com) wrote: On 10/02/2012 10:16 PM, Mathieu Desnoyers wrote: Eliminate false-sharing between call_rcu (enqueuer) and worker threads on the queue head and tail. Signed-off-by:

Re: [lttng-dev] rculfstack bug

2012-10-10 Thread Paul E. McKenney
) and worker threads on the queue head and tail. Acked-by: Paul E. McKenney paul...@linux.vnet.ibm.com Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com Could have managed to fix the issue, or change the timing enough that it does not reproduces. I'll continue

Re: [lttng-dev] [RFC] re-document rculfstack and even rename it

2012-10-10 Thread Paul E. McKenney
On Wed, Oct 10, 2012 at 03:52:08PM +0800, Lai Jiangshan wrote: rculfstack is not really require RCU-only. 1) cds_lfs_push_rcu() don't need any lock, don't need RCU nor other locks. 2) cds_lfs_pop_rcu() don't only one of the following synchronization(not only RCU): A) use

Re: [lttng-dev] rculfstack bug

2012-10-10 Thread Paul E. McKenney
On Wed, Oct 10, 2012 at 01:53:04PM -0400, Mathieu Desnoyers wrote: * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Wed, Oct 10, 2012 at 07:42:15AM -0400, Mathieu Desnoyers wrote: * Lai Jiangshan (la...@cn.fujitsu.com

Re: [lttng-dev] rculfstack bug

2012-10-10 Thread Paul E. McKenney
On Thu, Oct 11, 2012 at 09:31:01AM +0800, Lai Jiangshan wrote: On 10/11/2012 03:50 AM, Paul E. McKenney wrote: On Wed, Oct 10, 2012 at 01:53:04PM -0400, Mathieu Desnoyers wrote: * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote

Re: [lttng-dev] urcu stack and queues updates and documentation

2012-10-16 Thread Paul E. McKenney
On Sun, Oct 14, 2012 at 01:53:32PM -0400, Mathieu Desnoyers wrote: Hi Paul! I know you are currently looking at documentation of urcu data structures. I did quite a bit of work in that area these past days. Here is my plan: Actually, I diverted to the atomic operations, given that the

Re: [lttng-dev] urcu stack and queues updates and documentation

2012-10-22 Thread Paul E. McKenney
On Wed, Oct 17, 2012 at 11:19:46AM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Sun, Oct 14, 2012 at 01:53:32PM -0400, Mathieu Desnoyers wrote: Hi Paul! I know you are currently looking at documentation of urcu data structures. I did

[lttng-dev] Fw: Re: [PATCH v2] epoll: Support for disabling items, and a self-test app.

2012-10-29 Thread Paul E. McKenney
FYI, userspace RCU proposed to solve an issue with epoll. Thanx, Paul - Forwarded message from Matt Helsley matth...@linux.vnet.ibm.com - Date: Fri, 26 Oct 2012 14:52:42 -0700 From: Matt Helsley matth...@linux.vnet.ibm.com To:

[lttng-dev] [PATCH] wfcqueue: Fix lock and unlock functions

2012-11-15 Thread Paul E. McKenney
The current implementation of cds_wfcq_dequeue_lock() and cds_wfcq_dequeue_unlock() entails mutually assured recursion. Redirect to _cds_wfcq_dequeue_lock() and _cds_wfcq_dequeue_unlock(), respectively. Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com diff --git a/wfcqueue.c b

Re: [lttng-dev] [PATCH 14/16] urcu-qsbr: batch concurrent synchronize_rcu()

2012-11-22 Thread Paul E. McKenney
testdur 20 nr_readers 4 rdur 0 wdur 0 nr_writers 1 wdelay 0 nr_reads 19160162768 nr_writes 2253068 nr_ops 1916241583 2253068 vs 2137036 - a couple of runs show that this difference lost in the noise for single updater. CC: Paul E. McKenney paul

Re: [lttng-dev] [PATCH] urcu: avoid false sharing for rcu_gp_ctr

2012-12-10 Thread Paul E. McKenney
On Fri, Dec 07, 2012 at 12:22:52PM -0500, Mathieu Desnoyers wrote: * Lai Jiangshan (eag0...@gmail.com) wrote: On Saturday, December 8, 2012, Mathieu Desnoyers wrote: * Lai Jiangshan (eag0...@gmail.com javascript:;) wrote: we can define rcu_gp_ctr and registry with aligned attribute,

Re: [lttng-dev] [RFC PATCH urcu] Add last output parameter to pop/dequeue

2012-12-14 Thread Paul E. McKenney
On Thu, Dec 13, 2012 at 06:44:56AM -0500, Mathieu Desnoyers wrote: I noticed that in addition to having: - push/enqueue returning whether the stack/queue was empty prior to the operation, - pop_all/splice, by nature, emptying the stack/queue, it can be interesting to make pop/dequeue

Re: [lttng-dev] [rp] [RFC PATCH urcu] Add last output parameter to pop/dequeue

2013-01-15 Thread Paul E. McKenney
[Sorry for the delay, finally getting back to this.] On Mon, Dec 17, 2012 at 09:40:09AM -0500, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Thu, Dec 13, 2012 at 06:44:56AM -0500, Mathieu Desnoyers wrote: I noticed that in addition to having

Re: [lttng-dev] [PATCH] Add ACCESS_ONCE() to avoid compiler splitting assignments

2013-01-19 Thread Paul E. McKenney
On Wed, Jan 16, 2013 at 07:50:54AM -0500, Mathieu Desnoyers wrote: * Mathieu Desnoyers (mathieu.desnoy...@efficios.com) wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: As noted by Konstantin Khlebnikov, gcc can split assignment of constants to long variables (https

Re: [lttng-dev] [rp] [PATCH urcu] rculfhash: add assertions on node alignment

2013-02-14 Thread Paul E. McKenney
On Thu, Feb 14, 2013 at 11:19:33AM -0500, Mathieu Desnoyers wrote: I've had a report of someone running into issues with the RCU lock-free hash table by embedding the struct cds_lfht_node into a packed structure by mistake, thus not respecting alignment requirements stated in urcu/rculfhash.h.

Re: [lttng-dev] Quick questions about liburcu and RCU in general

2013-05-07 Thread Paul E. McKenney
On Tue, May 07, 2013 at 07:59:14AM -0400, Mathieu Desnoyers wrote: Hi Richard, * Richard Braun (rbr...@sceen.net) wrote: Hello, I'm currently studying RCU/URCU, and I have a few questions that I wasn't sure where to ask. 1/ Why use poll instead of sched_yield in e.g.

Re: [lttng-dev] [RFC PATCH urcu] Implement rcu_barrier()

2013-06-05 Thread Paul E. McKenney
On Fri, May 31, 2013 at 11:35:17AM -0400, Mathieu Desnoyers wrote: Awaits for all in-flight call_rcu handlers to complete execution before returning. Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com One suggestion below, looks good in general.

Re: [lttng-dev] [RFC] adding into middle of RCU list

2013-08-23 Thread Paul E. McKenney
rcu_assign_pointer() is that list_splice_init_rcu() is updating the pointers to reference something that is already visible to readers, so that there is no problem with pre-initialized values. Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com diff --git a/include/linux/rculist.h b/include/linux

Re: [lttng-dev] [RFC] adding into middle of RCU list

2013-08-23 Thread Paul E. McKenney
On Fri, Aug 23, 2013 at 12:09:56PM -0700, Stephen Hemminger wrote: On Fri, 23 Aug 2013 13:16:53 -0400 Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Thu, Aug 22, 2013 at 09:33:18PM -0700, Stephen Hemminger wrote: I

Re: [lttng-dev] [RFC] adding into middle of RCU list

2013-08-23 Thread Paul E. McKenney
On Fri, Aug 23, 2013 at 01:16:53PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Thu, Aug 22, 2013 at 09:33:18PM -0700, Stephen Hemminger wrote: I needed to add into the middle of an RCU list, does this make sense. From

Re: [lttng-dev] [RFC] adding into middle of RCU list

2013-08-29 Thread Paul E. McKenney
On Fri, Aug 23, 2013 at 02:08:22PM -0700, Paul E. McKenney wrote: On Fri, Aug 23, 2013 at 01:16:53PM -0400, Mathieu Desnoyers wrote: * Paul E. McKenney (paul...@linux.vnet.ibm.com) wrote: On Thu, Aug 22, 2013 at 09:33:18PM -0700, Stephen Hemminger wrote

Re: [lttng-dev] [RFC] adding into middle of RCU list

2013-08-31 Thread Paul E. McKenney
On Thu, Aug 29, 2013 at 07:16:37PM -0700, Josh Triplett wrote: On Thu, Aug 29, 2013 at 05:57:33PM -0700, Paul E. McKenney wrote: On Fri, Aug 23, 2013 at 02:08:22PM -0700, Paul E. McKenney wrote: On Fri, Aug 23, 2013 at 01:16:53PM -0400, Mathieu Desnoyers wrote: #define

Re: [lttng-dev] [RFC] adding into middle of RCU list

2013-09-01 Thread Paul E. McKenney
On Sun, Sep 01, 2013 at 01:42:10PM -0700, Josh Triplett wrote: On Sat, Aug 31, 2013 at 02:32:28PM -0700, Paul E. McKenney wrote: On Thu, Aug 29, 2013 at 07:16:37PM -0700, Josh Triplett wrote: On Thu, Aug 29, 2013 at 05:57:33PM -0700, Paul E. McKenney wrote: On Fri, Aug 23, 2013 at 02:08

Re: [lttng-dev] [PATCH] rcu: Make rcu_assign_pointer's assignment volatile and type-safe

2013-09-01 Thread Paul E. McKenney
On Sun, Sep 01, 2013 at 04:42:52PM -0700, Josh Triplett wrote: rcu_assign_pointer needs to use ACCESS_ONCE to make the assignment to the destination pointer volatile, to protect against compilers too clever for their own good. In addition, since rcu_assign_pointer force-casts the source

Re: [lttng-dev] [RFC PATCH] timekeeping: introduce timekeeping_is_busy()

2013-09-11 Thread Paul E. McKenney
On Wed, Sep 11, 2013 at 02:54:41PM -0400, Mathieu Desnoyers wrote: * John Stultz (john.stu...@linaro.org) wrote: On 09/11/2013 08:08 AM, Mathieu Desnoyers wrote: [...] Now focusing on features (the fix discussion is in a separate sub-thread): LTTng uses ktime to have the same

Re: [lttng-dev] bug in urcu

2013-11-03 Thread Paul E. McKenney
On Fri, Nov 01, 2013 at 08:18:59PM +, Mathieu Desnoyers wrote: - Original Message - From: Mathieu Desnoyers mathieu.desnoy...@efficios.com To: Vladimir Nikulichev n...@tbricks.com Cc: lttng-dev@lists.lttng.org, Paul E. McKenney paul...@linux.vnet.ibm.com Sent: Friday

Re: [lttng-dev] bug in urcu

2013-11-04 Thread Paul E. McKenney
On Sun, Nov 03, 2013 at 02:13:52PM +, Mathieu Desnoyers wrote: - Original Message - From: Paul E. McKenney paul...@linux.vnet.ibm.com To: Mathieu Desnoyers mathieu.desnoy...@efficios.com Cc: Vladimir Nikulichev n...@tbricks.com, lttng-dev@lists.lttng.org Sent: Sunday, November

Re: [lttng-dev] Xeon Phi memory barriers

2013-12-06 Thread Paul E. McKenney
, While reading this reply, please keep in mind that I'm in a mindset where I've been in a full week of meeting, and it's late on Friday evening here. So YMMV ;-) I'm CCing Paul E. McKenney, so he can debunk my answer :) liburcu does not build on the Intel Xeon Phi, because the chip

Re: [lttng-dev] Alternative to signals/sys_membarrier() in liburcu

2015-03-13 Thread Paul E. McKenney
...@msully.net, lttng-dev@lists.lttng.org, LKML linux-ker...@vger.kernel.org, Paul E. McKenney paul...@linux.vnet.ibm.com, Peter Zijlstra pet...@infradead.org, Ingo Molnar mi...@kernel.org, Thomas Gleixner t...@linutronix.de, Steven Rostedt rost...@goodmis.org Sent: Thursday, March 12

Re: [lttng-dev] Alternative to signals/sys_membarrier() in liburcu

2015-03-12 Thread Paul E. McKenney
On Thu, Mar 12, 2015 at 08:56:00PM +, Mathieu Desnoyers wrote: (sorry for re-send, my mail client tricked me into posting HTML to lkml) Hi, Michael Sullivan proposed a clever hack abusing mprotect() to perform the same effect as sys_membarrier() I submitted a few years ago (

Re: [lttng-dev] [PATCH] Fix: deadlock when thread join is issued in read-side C.S. (v2)

2015-04-25 Thread Paul E. McKenney
read-side critical sections to complete. Changes since v1: - Hold both rcu_gp_lock and rcu_registry_lock across fork in urcu-bp. Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com Reviewed-by: Paul E. McKenney paul...@linux.vnet.ibm.com CC: Eugene Ivanov eugene.iva...@orc

Re: [lttng-dev] Deadlock between call_rcu thread and RCU-bp thread doing registration in rcu_read_lock()

2015-04-17 Thread Paul E. McKenney
On Fri, Apr 17, 2015 at 12:23:46PM +0300, Eugene Ivanov wrote: Hi Mathieu, On 04/10/2015 11:26 PM, Mathieu Desnoyers wrote: - Original Message - Hi, I use rcu-bp (0.8.6) and get deadlock between call_rcu thread and threads willing to do rcu_read_lock(): 1. Some thread is in

Re: [lttng-dev] Deadlock between call_rcu thread and RCU-bp thread doing registration in rcu_read_lock()

2015-04-17 Thread Paul E. McKenney
On Fri, Apr 17, 2015 at 07:18:18AM -0700, Paul E. McKenney wrote: On Fri, Apr 17, 2015 at 12:23:46PM +0300, Eugene Ivanov wrote: Hi Mathieu, On 04/10/2015 11:26 PM, Mathieu Desnoyers wrote: - Original Message - Hi, I use rcu-bp (0.8.6) and get deadlock between call_rcu

Re: [lttng-dev] [PATCH] Fix: call_rcu_thread() affinity failure

2015-06-29 Thread Paul E. McKenney
mjean...@efficios.com Suggested-by: Paul E. McKenney paul...@linux.vnet.ibm.com Signed-off-by: Mathieu Desnoyers mathieu.desnoy...@efficios.com A couple of issues, but otherwise good. (They might even be issues with your code rather than my eyes, you never know

Re: [lttng-dev] [PATCH] Fix: call_rcu_thread() affinity failure

2015-06-29 Thread Paul E. McKenney
On Mon, Jun 29, 2015 at 11:06:15PM +, Mathieu Desnoyers wrote: - On Jun 29, 2015, at 7:01 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: On Mon, Jun 29, 2015 at 06:56:34PM -0400, Mathieu Desnoyers wrote: Make call_rcu_thread() affine itself more persistently Currently

Re: [lttng-dev] [RFC PATCH urcu] Fix: dynamic fallback to compat futex on sys_futex ENOSYS

2015-09-13 Thread Paul E. McKenney
asonable approach to me. Acked-by: Paul E. McKenney <paul...@linux.vnet.ibm.com> > Signed-off-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> > CC: Paul E. McKenney <paul...@linux.vnet.ibm.com> > CC: Michael Jeanson <mjean...@efficios.com> > CC: Jon Be

[lttng-dev] FYI, another paper checking URCU correctness

2016-06-13 Thread Paul E. McKenney
Hello! On the off chance that this is new news of interest... https://arxiv.org/pdf/1606.01400v1.pdf "Operational Aspects of C/C++ Concurrency", Anton Podkopaev, Ilya Sergey, Aleksandar Nanevski. At first glance, they seem to be using a combination of formal verification and testing, using a

Re: [lttng-dev] [rp] [RFC PATCH urcu] urcu_ref_get: API change: return boolean

2016-01-21 Thread Paul E. McKenney
On Thu, Jan 21, 2016 at 05:06:09PM +, Mathieu Desnoyers wrote: > - On Jan 21, 2016, at 11:59 AM, Josh Triplett j...@joshtriplett.org wrote: > > > On Thu, Jan 21, 2016 at 04:45:20PM +, Mathieu Desnoyers wrote: > >> - On Jan 19, 2016, at 3:57 PM, Mathieu Desnoyers > >>

Re: [lttng-dev] real time Userspace RCU

2016-03-11 Thread Paul E. McKenney
I know real time system focus on predictability on both timing and > > memory consumption. > > So how does real time urcu support predictability? > > Could you provide me some papers, documents or any materials about any > > aspect of real time urcu? > > Adding Paul E. McKen

Re: [lttng-dev] real time Userspace RCU

2016-03-31 Thread Paul E. McKenney
work on -rt Linux. Thanx, Paul > Thanks again. > > On Fri, Mar 11, 2016 at 10:00 PM, Mathieu Desnoyers > <mathieu.desnoy...@efficios.com> wrote: > > - On Mar 11, 2016, at 6:45 AM, Paul E. McKenney > > paul...@linux.vnet.ibm.com wrote: > >

Re: [lttng-dev] Question about lock in synchronize_rcu implementation of URCU

2016-04-28 Thread Paul E. McKenney
> > Thanks again!! > > Yuxin > > > > On Thu, Apr 28, 2016 at 8:44 AM, Boqun Feng <boqun.f...@gmail.com> wrote: > >> Hi Paul and Yuxin, > >> > >> On Wed, Apr 27, 2016 at 09:23:27PM -0700, Paul E. McKenney wrote: > >>> Try building wi

Re: [lttng-dev] Question about lock in synchronize_rcu implementation of URCU

2016-04-28 Thread Paul E. McKenney
On Thu, Apr 28, 2016 at 08:44:01PM +0800, Boqun Feng wrote: > Hi Paul and Yuxin, > > On Wed, Apr 27, 2016 at 09:23:27PM -0700, Paul E. McKenney wrote: > > Try building without it and see what happens when you run the tests. > > > > I've run a 'regtest' with the

Re: [lttng-dev] Question about lock in synchronize_rcu implementation of URCU

2016-04-28 Thread Paul E. McKenney
u, Apr 28, 2016 at 8:44 AM, Boqun Feng <boqun.f...@gmail.com> wrote: > > Hi Paul and Yuxin, > > > > On Wed, Apr 27, 2016 at 09:23:27PM -0700, Paul E. McKenney wrote: > >> Try building without it and see what happens when you run the tests. > >> > &g

Re: [lttng-dev] Question about lock in synchronize_rcu implementation of URCU

2016-04-27 Thread Paul E. McKenney
n't currently perform grace period, why do we use the rcu_gp_lock? > > Thank you. > Yuxin > > On Wed, Apr 27, 2016 at 10:08 PM, Paul E. McKenney > <paul...@linux.vnet.ibm.com> wrote: > > On Wed, Apr 27, 2016 at 09:34:16PM -0400, Yuxin Ren wrote: > >>

Re: [lttng-dev] Question about lock in synchronize_rcu implementation of URCU

2016-04-27 Thread Paul E. McKenney
On Wed, Apr 27, 2016 at 09:34:16PM -0400, Yuxin Ren wrote: > Hi, > > I am learning the URCU code. > > Why do we need rcu_gp_lock in synchronize_rcu? > https://github.com/urcu/userspace-rcu/blob/master/urcu.c#L401 > > In the comment, it says this lock ensures mutual exclusion between > threads

Re: [lttng-dev] question about rcu_bp_exit()

2016-05-19 Thread Paul E. McKenney
On Wed, May 18, 2016 at 06:40:03PM +, Mathieu Desnoyers wrote: > - On May 18, 2016, at 5:44 AM, songxin wrote: > > > Hi, > > Now I get a crash because receiving signal SIGSEGV as below. > > > #0 arena_alloc (arena=) at > >

Re: [lttng-dev] RCU on non-cache-coherent memory

2016-08-04 Thread Paul E. McKenney
e? > > Not only RCU, any other synchronization technique on top of > > non-cache-coherent multi-core > > is also helpful. > > CCing Paul E. McKenney, who might know more on this topic. > > Back in 2009 when I started the liburcu.org project, I > planned to eventu

Re: [lttng-dev] High memory consumption issue on RCU side

2016-09-24 Thread Paul E. McKenney
On Sat, Sep 24, 2016 at 10:42:24AM +0300, Evgeniy Ivanov wrote: > Hi Mathieu, > > On Sat, Sep 24, 2016 at 12:59 AM, Mathieu Desnoyers > wrote: > > - On Sep 22, 2016, at 3:14 PM, Evgeniy Ivanov lolkaanti...@gmail.com > > wrote: > > > >> Hi all, > >> > >> I'm

Re: [lttng-dev] High memory consumption issue on RCU side

2016-09-24 Thread Paul E. McKenney
On Sat, Sep 24, 2016 at 03:34:47PM +, Mathieu Desnoyers wrote: > - On Sep 24, 2016, at 11:22 AM, Paul E. McKenney > paul...@linux.vnet.ibm.com wrote: > > > On Sat, Sep 24, 2016 at 10:42:24AM +0300, Evgeniy Ivanov wrote: > >> Hi Mathieu, > >> >

Re: [lttng-dev] liburcu rcu_xchg_pointer and rcu_cmpxchg_pointer ARM32 barriers

2016-12-05 Thread Paul E. McKenney
On Mon, Dec 05, 2016 at 02:14:47PM +, Mathieu Desnoyers wrote: > Hi Paul, > > So about the liburcu rcu_xchg_pointer() barriers, here is the current > situation: > > rcu_xchg_pointer is implemented as: > > #define _rcu_xchg_pointer(p, v) \ > __extension__

Re: [lttng-dev] liburcu rcu_xchg_pointer and rcu_cmpxchg_pointer ARM32 barriers

2016-12-05 Thread Paul E. McKenney
On Mon, Dec 05, 2016 at 11:01:10PM +, Mathieu Desnoyers wrote: > - On Dec 5, 2016, at 5:35 PM, Paul E. McKenney paul...@linux.vnet.ibm.com > wrote: > > > On Mon, Dec 05, 2016 at 02:14:47PM +, Mathieu Desnoyers wrote: > >> Hi Paul, > >> > >

Re: [lttng-dev] question about the RCU variant in CITRUS tree paper

2017-05-11 Thread Paul E. McKenney
On Thu, May 11, 2017 at 04:05:45PM -0400, Yuxin Ren wrote: > Hi, > > I am learning U-RCU now. > And I read paper Concurrent Updates with RCU: Search Tree as an Example > ( > https://pdfs.semanticscholar.org/73e4/cd29273cf9d98d35bc184330e694ba798987.pdf > ) > > In this paper, the authors present

Re: [lttng-dev] question about the RCU variant in CITRUS tree paper

2017-05-12 Thread Paul E. McKenney
stion could be stupid. > Many thanks for your time > Yuxin > > On Thu, May 11, 2017 at 4:23 PM, Paul E. McKenney > <paul...@linux.vnet.ibm.com> wrote: > > On Thu, May 11, 2017 at 04:05:45PM -0400, Yuxin Ren wrote: > >> Hi, > >> > >> I

Re: [lttng-dev] [RFC PATCH liburcu 0/2] Remove RCU requirements on hash table destroy

2017-06-05 Thread Paul E. McKenney
On Tue, May 30, 2017 at 05:10:18PM -0400, Mathieu Desnoyers wrote: > The RCU lock-free hash table currently requires that the destroy > function should not be called from within RCU read-side critical > sections. This is caused by the lazy resize, which uses the call_rcu > worker thread, even

Re: [lttng-dev] large liblttng-ust startup overhead (ust_lock)

2017-09-06 Thread Paul E. McKenney
BTW, your expedited commit hit mainline earlier this week. Here is hoping! ;-) Thanx, Paul On Wed, Sep 06, 2017 at 08:23:40PM +, Mathieu Desnoyers wrote: > - On Sep 6, 2017, at 3:57 PM, Mathieu Desnoyers >

Re: [lttng-dev] RCU consistency guarantees

2019-12-09 Thread Paul E. McKenney
consistency, which opens the door to things like RCU. Thanx, Paul > Thanks > Yuxin > > On Fri, Dec 6, 2019 at 11:30 AM Paul E. McKenney wrote: > > > On Fri, Dec 06, 2019 at 10:59:05AM -0500, Mathieu Desnoyers wrote: &g

Re: [lttng-dev] RCU consistency guarantees

2019-12-09 Thread Paul E. McKenney
On Sat, Dec 07, 2019 at 03:04:42PM -0500, Yuxin Ren wrote: > Thanks a lot for your help. I have some questions below. > > On Sat, Dec 7, 2019 at 1:37 AM Paul E. McKenney wrote: > > > On Fri, Dec 06, 2019 at 07:00:13PM -0500, Yuxin Ren wrote: > > > Thanks so much f

Re: [lttng-dev] RCU consistency guarantees

2019-12-15 Thread Paul E. McKenney
On Sat, Dec 14, 2019 at 01:31:31AM -0500, Yuxin Ren wrote: > Hi Paul > > On Sat, Dec 7, 2019 at 5:42 PM Paul E. McKenney wrote: > > > On Sat, Dec 07, 2019 at 03:04:42PM -0500, Yuxin Ren wrote: > > > Thanks a lot for your help. I have some questions below. > > &g

Re: [lttng-dev] RCU consistency guarantees

2019-12-06 Thread Paul E. McKenney
not designed for > > linearizability, and it is totally acceptable that RCU is not linearizable. > > However, I am curious how to accurately/formally Characterize RCU > > consistency > > model/guarantees > > Adding Paul E. McKenney in CC. > > I am referring to the

Re: [lttng-dev] RCU consistency guarantees

2019-12-15 Thread Paul E. McKenney
On Sun, Dec 15, 2019 at 05:10:11PM -0500, Yuxin Ren wrote: > On Sun, Dec 15, 2019 at 3:30 PM Paul E. McKenney wrote: > > > On Sat, Dec 14, 2019 at 01:31:31AM -0500, Yuxin Ren wrote: > > > Hi Paul > > > > > > On Sat, Dec 7, 2019 at 5:42 PM Paul E. McKenney

Re: [lttng-dev] call_rcu seems inefficient without futex

2020-01-27 Thread Paul E. McKenney
On Mon, Jan 27, 2020 at 10:38:05AM -0500, Mathieu Desnoyers wrote: > - On Jan 23, 2020, at 7:19 PM, lttng-dev lttng-dev@lists.lttng.org wrote: > > > Hi, > > > > I recently installed knot dns for a very small FreeBSD server. I noticed > > that it uses a surprising amount of CPU, even when

Re: [lttng-dev] [PATCH] call_rcu: Fix race between rcu_barrier() and call_rcu_data_free()

2020-10-26 Thread Paul E. McKenney via lttng-dev
eated and exit repeatedly, and make a per-thread call_rcu() worker in the meantime.. Thoughts? Thanx, Paul [1] git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/perfbook.git > Thanks, > > Mathieu > > [1] https://ci.lttn

Re: [lttng-dev] [PATCH urcu] fix: bump tests thread limit to 256

2020-12-09 Thread Paul E. McKenney via lttng-dev
el system where this was reported. > > > > Signed-off-by: Michael Jeanson > > Cc: Paul E. McKenney > > Change-Id: Ib3cb5d8cb4515e6f626be33c2685fa38cb081782 > > --- > > tests/common/api.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > >

Re: [lttng-dev] [PATCH urcu 4/4] Don't force a target and optimization level on ARMv7

2020-12-15 Thread Paul E. McKenney via lttng-dev
has undoubtedly changed over time, so... > Signed-off-by: Michael Jeanson > Cc: Paul E. McKenney Acked-by: Paul E. McKenney > Change-Id: I1d1bb5cc0fa0be8f8b1d6a9ad7bf063809be1aef > --- > configure.ac | 4 > 1 file changed, 4 deletions(-) > > diff --git a/conf

[lttng-dev] [PATCH] call_rcu: Fix race between rcu_barrier() and call_rcu_data_free()

2020-10-22 Thread Paul E. McKenney via lttng-dev
-by: Paul E. McKenney Cc: Mathieu Desnoyers Cc: Stephen Hemminger Cc: Alan Stern Cc: Lai Jiangshan Cc: Cc: --- urcu-call-rcu-impl.h |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/urcu-call-rcu-impl.h b/src/urcu-call-rcu-impl.h index b6ec6ba..18fd65a 100644

Re: [lttng-dev] User-space RCU: call rcu_barrier() before dissociating helper thread?

2021-05-05 Thread Paul E. McKenney via lttng-dev
On Wed, May 05, 2021 at 10:46:58AM -0400, Mathieu Desnoyers wrote: > - On May 5, 2021, at 3:54 AM, Martin Wilck mwi...@suse.com wrote: > > > On Fri, 2021-04-30 at 14:41 -0400, Mathieu Desnoyers wrote: > >> - On Apr 29, 2021, at 9:49 AM, lttng-dev > >> lttng-dev@lists.lttng.org wrote: > >>

Re: [lttng-dev] liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ?

2021-04-16 Thread Paul E. McKenney via lttng-dev
On Fri, Apr 16, 2021 at 03:30:53PM -0400, Mathieu Desnoyers wrote: > - On Apr 16, 2021, at 3:02 PM, paulmck paul...@kernel.org wrote: > [...] > > > > If it can be done reasonably, I suggest also having some way for the > > person building userspace RCU to say "I know what I am doing, so do >

Re: [lttng-dev] liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ?

2021-04-16 Thread Paul E. McKenney via lttng-dev
On Fri, Apr 16, 2021 at 02:40:08PM -0400, Mathieu Desnoyers wrote: > - On Apr 16, 2021, at 12:01 PM, paulmck paul...@kernel.org wrote: > > > On Fri, Apr 16, 2021 at 05:17:11PM +0200, Peter Zijlstra wrote: > >> On Fri, Apr 16, 2021 at 10:52:16AM -0400, Mathieu Desnoyers wrote: > >> > Hi Paul,

Re: [lttng-dev] liburcu: LTO breaking rcu_dereference on arm64 and possibly other architectures ?

2021-04-16 Thread Paul E. McKenney via lttng-dev
On Fri, Apr 16, 2021 at 05:17:11PM +0200, Peter Zijlstra wrote: > On Fri, Apr 16, 2021 at 10:52:16AM -0400, Mathieu Desnoyers wrote: > > Hi Paul, Will, Peter, > > > > I noticed in this discussion https://lkml.org/lkml/2021/4/16/118 that LTO > > is able to break rcu_dereference. This seems to be

Re: [lttng-dev] [PATCH] QSBR: Use xor operation to replace add operation when changing rcu_gp.ctr value

2022-02-16 Thread Paul E. McKenney via lttng-dev
On Wed, Feb 16, 2022 at 03:53:20PM -0500, Mathieu Desnoyers wrote: > - On Feb 16, 2022, at 2:35 AM, lttng-dev lttng-dev@lists.lttng.org wrote: > > > It is enough to have three values of rcu_gp.ctr, 00 for INACTIVE, > > 01 or 11 for ACTIVE. So it is possible to replace add operation > > with

Re: [lttng-dev] [RFC] Deprecating RCU signal flavor

2023-08-23 Thread Paul E. McKenney via lttng-dev
On Mon, Aug 21, 2023 at 11:43:32AM -0400, Mathieu Desnoyers wrote: > On 8/15/23 08:38, Mathieu Desnoyers via lttng-dev wrote: > > On 8/14/23 17:05, Olivier Dion via lttng-dev wrote: > > > > > > After discussing it with Mathieu, we agree on the following 3 phases for > > > deprecating the signal

Re: [lttng-dev] RCU API usage from call_rcu callbacks?

2023-03-22 Thread Paul E. McKenney via lttng-dev
On Wed, Mar 22, 2023 at 09:57:25AM -0400, Mathieu Desnoyers wrote: > On 2023-03-22 07:08, Ondřej Surý via lttng-dev wrote: > > Hi, > > > > the documentation is pretty silent on this, and asking here is probably > > going to be faster > > than me trying to use the source to figure this out. > >

Re: [lttng-dev] [PATCH v2 04/12] urcu/system: Use atomic builtins if configured

2023-07-05 Thread Paul E. McKenney via lttng-dev
On Wed, Jul 05, 2023 at 03:03:21PM -0400, Olivier Dion wrote: > On Wed, 05 Jul 2023, "Paul E. McKenney" wrote: > > On Tue, Jul 04, 2023 at 10:43:21AM -0400, Olivier Dion wrote: > >> On Wed, 21 Jun 2023, "Paul E. McKenney" wrote: > >> > On Wed, Ju

  1   2   >