Re: [RFC v1 09/14] bus1: provide transaction context for multicasts

From: Peter Zijlstra
Date: Fri Oct 28 2016 - 10:37:39 EST


On Wed, Oct 26, 2016 at 09:18:05PM +0200, David Herrmann wrote:
> From: Tom Gundersen <teg@xxxxxxx>
>
> 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 <teg@xxxxxxx>
> Signed-off-by: David Herrmann <dh.herrmann@xxxxxxxxx>
> ---
> 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.