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 Mathi

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 ap

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 o

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 qu

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 dequ

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 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_

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 same

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) > > > > > > When

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 arch

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 cases

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 an

[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 arch