Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 04:33:50PM +0200, Tom Gundersen wrote: > Ah, I see, we are talking past each other. Ah I see where my reasoning went wobbly, not sure how to fully express that yet. I think your solution is stronger than strictly required though, but I'm not sure there's a better one.

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 04:33:50PM +0200, Tom Gundersen wrote: > Ah, I see, we are talking past each other. Ah I see where my reasoning went wobbly, not sure how to fully express that yet. I think your solution is stronger than strictly required though, but I'm not sure there's a better one.

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Tom Gundersen
On Fri, Oct 28, 2016 at 3:58 PM, Peter Zijlstra wrote: > On Fri, Oct 28, 2016 at 03:47:58PM +0200, Tom Gundersen wrote: >> On Fri, Oct 28, 2016 at 3:33 PM, Peter Zijlstra wrote: >> > On Fri, Oct 28, 2016 at 01:33:25PM +0200, Tom Gundersen wrote: > >> >

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Tom Gundersen
On Fri, Oct 28, 2016 at 3:58 PM, Peter Zijlstra wrote: > On Fri, Oct 28, 2016 at 03:47:58PM +0200, Tom Gundersen wrote: >> On Fri, Oct 28, 2016 at 3:33 PM, Peter Zijlstra wrote: >> > On Fri, Oct 28, 2016 at 01:33:25PM +0200, Tom Gundersen wrote: > >> > And this, precisely, is what generates all

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 03:47:58PM +0200, Tom Gundersen wrote: > On Fri, Oct 28, 2016 at 3:33 PM, Peter Zijlstra wrote: > > On Fri, Oct 28, 2016 at 01:33:25PM +0200, Tom Gundersen wrote: > > And this, precisely, is what generates all the complexity found in this > > patch.

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 03:47:58PM +0200, Tom Gundersen wrote: > On Fri, Oct 28, 2016 at 3:33 PM, Peter Zijlstra wrote: > > On Fri, Oct 28, 2016 at 01:33:25PM +0200, Tom Gundersen wrote: > > And this, precisely, is what generates all the complexity found in this > > patch. You want to strictly

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Tom Gundersen
On Fri, Oct 28, 2016 at 3:33 PM, Peter Zijlstra wrote: > On Fri, Oct 28, 2016 at 01:33:25PM +0200, Tom Gundersen wrote: >> On Thu, Oct 27, 2016 at 6:43 PM, Peter Zijlstra wrote: >> > On Wed, Oct 26, 2016 at 09:18:02PM +0200, David Herrmann wrote: >> >

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Tom Gundersen
On Fri, Oct 28, 2016 at 3:33 PM, Peter Zijlstra wrote: > On Fri, Oct 28, 2016 at 01:33:25PM +0200, Tom Gundersen wrote: >> On Thu, Oct 27, 2016 at 6:43 PM, Peter Zijlstra wrote: >> > On Wed, Oct 26, 2016 at 09:18:02PM +0200, David Herrmann wrote: >> > >> >> A bus1 message queue is a FIFO, i.e.,

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 01:33:25PM +0200, Tom Gundersen wrote: > On Thu, Oct 27, 2016 at 6:43 PM, Peter Zijlstra wrote: > > On Wed, Oct 26, 2016 at 09:18:02PM +0200, David Herrmann wrote: > > > >> A bus1 message queue is a FIFO, i.e., messages are linearly ordered by > >>

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Peter Zijlstra
On Fri, Oct 28, 2016 at 01:33:25PM +0200, Tom Gundersen wrote: > On Thu, Oct 27, 2016 at 6:43 PM, Peter Zijlstra wrote: > > On Wed, Oct 26, 2016 at 09:18:02PM +0200, David Herrmann wrote: > > > >> A bus1 message queue is a FIFO, i.e., messages are linearly ordered by > >> the time they were sent.

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Tom Gundersen
On Thu, Oct 27, 2016 at 6:43 PM, Peter Zijlstra wrote: > On Wed, Oct 26, 2016 at 09:18:02PM +0200, David Herrmann wrote: > >> A bus1 message queue is a FIFO, i.e., messages are linearly ordered by >> the time they were sent. Moreover, atomic delivery of messages to >>

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-28 Thread Tom Gundersen
On Thu, Oct 27, 2016 at 6:43 PM, Peter Zijlstra wrote: > On Wed, Oct 26, 2016 at 09:18:02PM +0200, David Herrmann wrote: > >> A bus1 message queue is a FIFO, i.e., messages are linearly ordered by >> the time they were sent. Moreover, atomic delivery of messages to >> multiple queues are

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-27 Thread Peter Zijlstra
On Wed, Oct 26, 2016 at 09:18:02PM +0200, David Herrmann wrote: > A bus1 message queue is a FIFO, i.e., messages are linearly ordered by > the time they were sent. Moreover, atomic delivery of messages to > multiple queues are supported, without any global synchronization, i.e., > the order of

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-27 Thread Peter Zijlstra
On Wed, Oct 26, 2016 at 09:18:02PM +0200, David Herrmann wrote: > A bus1 message queue is a FIFO, i.e., messages are linearly ordered by > the time they were sent. Moreover, atomic delivery of messages to > multiple queues are supported, without any global synchronization, i.e., > the order of

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-27 Thread Peter Zijlstra
On Wed, Oct 26, 2016 at 09:18:02PM +0200, David Herrmann wrote: > Messages can be destined for multiple queues, hence, we need to be > careful that all queues get a consistent order of incoming messages. We > define the concept of `global order' to provide a basic set of > guarantees. This global

Re: [RFC v1 06/14] bus1: util - queue utility library

2016-10-27 Thread Peter Zijlstra
On Wed, Oct 26, 2016 at 09:18:02PM +0200, David Herrmann wrote: > Messages can be destined for multiple queues, hence, we need to be > careful that all queues get a consistent order of incoming messages. We > define the concept of `global order' to provide a basic set of > guarantees. This global

[RFC v1 06/14] bus1: util - queue utility library

2016-10-26 Thread David Herrmann
From: Tom Gundersen (Please refer to 'Lamport Timestamps', the concept of 'happened-before', and 'causal ordering'. The queue implementation has its roots in Lamport Timestamps, treating a set of local CPUs as a distributed system to avoid any global

[RFC v1 06/14] bus1: util - queue utility library

2016-10-26 Thread David Herrmann
From: Tom Gundersen (Please refer to 'Lamport Timestamps', the concept of 'happened-before', and 'causal ordering'. The queue implementation has its roots in Lamport Timestamps, treating a set of local CPUs as a distributed system to avoid any global synchronization.) A bus1