Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761158AbcJ1Ohh (ORCPT ); Fri, 28 Oct 2016 10:37:37 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:42909 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761032AbcJ1Ohg (ORCPT ); Fri, 28 Oct 2016 10:37:36 -0400 Date: Fri, 28 Oct 2016 16:37:26 +0200 From: Peter Zijlstra To: David Herrmann Cc: linux-kernel@vger.kernel.org, Andy Lutomirski , Jiri Kosina , Greg KH , Hannes Reinecke , Steven Rostedt , Arnd Bergmann , Tom Gundersen , Josh Triplett , Linus Torvalds , Andrew Morton Subject: Re: [RFC v1 09/14] bus1: provide transaction context for multicasts Message-ID: <20161028143726.GJ3175@twins.programming.kicks-ass.net> References: <20161026191810.12275-1-dh.herrmann@gmail.com> <20161026191810.12275-10-dh.herrmann@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161026191810.12275-10-dh.herrmann@gmail.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1071 Lines: 26 On Wed, Oct 26, 2016 at 09:18:05PM +0200, David Herrmann wrote: > From: Tom Gundersen > > The transaction engine is an object that lives on the stack and is used > to stage and commit multicasts properly. Unlike unicasts, a multicast > cannot just be queued on each destination, but must be properly > synchronized. This requires us to first stage each message on their > respective destination, then sync and tick the clocks, and eventual > commit all messages. > > The transaction context implements this logic for both, unicasts and > multicasts. It hides the timestamp handling and takes care to properly > synchronize accesses to the peer queues. > > Signed-off-by: Tom Gundersen > Signed-off-by: David Herrmann > --- > ipc/bus1/Makefile | 1 + > ipc/bus1/peer.c | 2 + > ipc/bus1/peer.h | 3 + > ipc/bus1/tx.c | 360 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > ipc/bus1/tx.h | 102 ++++++++++++++++ See, this is way more than 4 lines. You don't need any of this for causality.