Re: [PATCH] relay: Use per CPU constructs for the relay channel buffer pointers

From: Chris Wilson
Date: Thu Aug 11 2016 - 03:04:17 EST


On Thu, Aug 11, 2016 at 12:35:40PM +0530, akash.goel@xxxxxxxxx wrote:
> From: Akash Goel <akash.goel@xxxxxxxxx>
>
> relay essentially needs to maintain the per CPU array of channel buffer
> pointers but it manually creates that array.
> Instead its better to avail the per CPU constructs, provided by the
> kernel, to allocate & access the array of pointer to channel buffers.
>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> Signed-off-by: Akash Goel <akash.goel@xxxxxxxxx>

This has the benefit of being a mechnical change and I could not think
of a better way to express the per-cpu indirection.

relay.h should probably include <linux/percpu.h> so that it pulls in
the percpu api explicitly.

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris

--
Chris Wilson, Intel Open Source Technology Centre