Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-04-11 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: > Mathieu Desnoyers wrote: > > It is provided as a starting point only. Test cases should be ported > > from Userspace RCU to kernel space and thoroughly ran on a wide range of > > architectures before considering this port production-ready. > > Hi

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-04-11 Thread Eric Wong
Mathieu Desnoyers wrote: > It is provided as a starting point only. Test cases should be ported > from Userspace RCU to kernel space and thoroughly ran on a wide range of > architectures before considering this port production-ready. Hi Mathieu, any progress on this front? I'm not sure how to

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-04-11 Thread Eric Wong
Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: It is provided as a starting point only. Test cases should be ported from Userspace RCU to kernel space and thoroughly ran on a wide range of architectures before considering this port production-ready. Hi Mathieu, any progress on this

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-04-11 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: It is provided as a starting point only. Test cases should be ported from Userspace RCU to kernel space and thoroughly ran on a wide range of architectures before considering this port

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-18 Thread Eric Wong
Mathieu Desnoyers wrote: > Thanks for providing this detailed scenario. I think there is an > important aspect in the use of splice I suggested on which we are not > fully understanding each other. I will annotate your scenario below with > clarifications: Ah yes, I somehow thought splice would

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-18 Thread Eric Wong
Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: Thanks for providing this detailed scenario. I think there is an important aspect in the use of splice I suggested on which we are not fully understanding each other. I will annotate your scenario below with clarifications: Ah yes, I

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-16 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: > Eric Wong wrote: > > Mathieu Desnoyers wrote: > > > * Eric Wong (normalper...@yhbt.net) wrote: > > > > Mathieu Desnoyers wrote: > > > > > +/* > > > > > + * Load a data from shared memory. > > > > > + */ > > > > > +#define CMM_LOAD_SHARED(p)

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-16 Thread Eric Wong
Eric Wong wrote: > Mathieu Desnoyers wrote: > > * Eric Wong (normalper...@yhbt.net) wrote: > > > Mathieu Desnoyers wrote: > > > > +/* > > > > + * Load a data from shared memory. > > > > + */ > > > > +#define CMM_LOAD_SHARED(p) ACCESS_ONCE(p) > > > > > > When iterating through the

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-16 Thread Eric Wong
Eric Wong normalper...@yhbt.net wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: +/* + * Load a data from shared memory. + */ +#define CMM_LOAD_SHARED(p)

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-16 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: Eric Wong normalper...@yhbt.net wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: +/* + * Load a data from shared memory.

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: > Mathieu Desnoyers wrote: > > * Eric Wong (normalper...@yhbt.net) wrote: > > > Mathieu Desnoyers wrote: > > > > The advantage of using splice() over dequeue() is that you will reduce > > > > the amount of interactions between concurrent enqueue and

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Mathieu Desnoyers
* Peter Hurley (pe...@hurleysoftware.com) wrote: > On Mon, 2013-03-11 at 17:36 -0400, Mathieu Desnoyers wrote: > > +/* > > + * Do not put head and tail on the same cache-line if concurrent > > + * enqueue/dequeue are expected from many CPUs. This eliminates > > + * false-sharing between enqueue

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Peter Hurley
On Mon, 2013-03-11 at 17:36 -0400, Mathieu Desnoyers wrote: > +/* > + * Do not put head and tail on the same cache-line if concurrent > + * enqueue/dequeue are expected from many CPUs. This eliminates > + * false-sharing between enqueue and dequeue. > + */ > +struct wfcq_head { > + struct

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Eric Wong
Mathieu Desnoyers wrote: > * Eric Wong (normalper...@yhbt.net) wrote: > > Mathieu Desnoyers wrote: > > > The advantage of using splice() over dequeue() is that you will reduce > > > the amount of interactions between concurrent enqueue and dequeue > > > operations on the head and tail of the

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: > Mathieu Desnoyers wrote: > > * Eric Wong (normalper...@yhbt.net) wrote: > > > Mathieu Desnoyers wrote: > > > > +/* > > > > + * Load a data from shared memory. > > > > + */ > > > > +#define CMM_LOAD_SHARED(p) ACCESS_ONCE(p) > > > > > >

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Eric Wong
Mathieu Desnoyers wrote: > * Eric Wong (normalper...@yhbt.net) wrote: > > Mathieu Desnoyers wrote: > > > +/* > > > + * Load a data from shared memory. > > > + */ > > > +#define CMM_LOAD_SHARED(p) ACCESS_ONCE(p) > > > > When iterating through the queue by dequeueing, I needed a way

[RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation (v2)

2013-03-14 Thread Mathieu Desnoyers
Ported to the Linux kernel from Userspace RCU library, at commit 108a92e5b97ee91b2b902dba2dd2e78aab42f420. Ref: http://git.lttng.org/userspace-rcu.git It is provided as a starting point only. Test cases should be ported from Userspace RCU to kernel space and thoroughly ran on a wide range of

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: > Mathieu Desnoyers wrote: > > Ported to the Linux kernel from Userspace RCU library, at commit > > 108a92e5b97ee91b2b902dba2dd2e78aab42f420. > > > > Ref: http://git.lttng.org/userspace-rcu.git > > > > It is provided as a starting point only. Test

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: Ported to the Linux kernel from Userspace RCU library, at commit 108a92e5b97ee91b2b902dba2dd2e78aab42f420. Ref: http://git.lttng.org/userspace-rcu.git It is provided as a starting

[RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation (v2)

2013-03-14 Thread Mathieu Desnoyers
Ported to the Linux kernel from Userspace RCU library, at commit 108a92e5b97ee91b2b902dba2dd2e78aab42f420. Ref: http://git.lttng.org/userspace-rcu.git It is provided as a starting point only. Test cases should be ported from Userspace RCU to kernel space and thoroughly ran on a wide range of

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Eric Wong
Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: +/* + * Load a data from shared memory. + */ +#define CMM_LOAD_SHARED(p) ACCESS_ONCE(p) When iterating

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: +/* + * Load a data from shared memory. + */ +#define CMM_LOAD_SHARED(p)

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Eric Wong
Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: The advantage of using splice() over dequeue() is that you will reduce the amount of interactions between concurrent enqueue and

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Peter Hurley
On Mon, 2013-03-11 at 17:36 -0400, Mathieu Desnoyers wrote: +/* + * Do not put head and tail on the same cache-line if concurrent + * enqueue/dequeue are expected from many CPUs. This eliminates + * false-sharing between enqueue and dequeue. + */ +struct wfcq_head { + struct wfcq_node

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Mathieu Desnoyers
* Peter Hurley (pe...@hurleysoftware.com) wrote: On Mon, 2013-03-11 at 17:36 -0400, Mathieu Desnoyers wrote: +/* + * Do not put head and tail on the same cache-line if concurrent + * enqueue/dequeue are expected from many CPUs. This eliminates + * false-sharing between enqueue and

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-14 Thread Mathieu Desnoyers
* Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Eric Wong (normalper...@yhbt.net) wrote: Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: The advantage of using splice() over dequeue() is that you will reduce the amount of

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-13 Thread Eric Wong
Mathieu Desnoyers wrote: > Ported to the Linux kernel from Userspace RCU library, at commit > 108a92e5b97ee91b2b902dba2dd2e78aab42f420. > > Ref: http://git.lttng.org/userspace-rcu.git > > It is provided as a starting point only. Test cases should be ported > from Userspace RCU to kernel space

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-13 Thread Eric Wong
Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: Ported to the Linux kernel from Userspace RCU library, at commit 108a92e5b97ee91b2b902dba2dd2e78aab42f420. Ref: http://git.lttng.org/userspace-rcu.git It is provided as a starting point only. Test cases should be ported from

[RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-11 Thread Mathieu Desnoyers
Ported to the Linux kernel from Userspace RCU library, at commit 108a92e5b97ee91b2b902dba2dd2e78aab42f420. Ref: http://git.lttng.org/userspace-rcu.git It is provided as a starting point only. Test cases should be ported from Userspace RCU to kernel space and thoroughly ran on a wide range of

[RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-03-11 Thread Mathieu Desnoyers
Ported to the Linux kernel from Userspace RCU library, at commit 108a92e5b97ee91b2b902dba2dd2e78aab42f420. Ref: http://git.lttng.org/userspace-rcu.git It is provided as a starting point only. Test cases should be ported from Userspace RCU to kernel space and thoroughly ran on a wide range of