[PATCH] arm64: mte: allow async MTE to be upgraded to sync on a per-CPU basis

Catalin Marinas catalin.marinas at arm.com
Thu Jun 3 07:30:21 PDT 2021


Hi Peter,

On Wed, Jun 02, 2021 at 04:24:45PM -0700, Peter Collingbourne wrote:
> On some CPUs the performance of MTE in synchronous mode is the same
> as that of asynchronous mode. This makes it worthwhile to enable
> synchronous mode on those CPUs when asynchronous mode is requested,
> in order to gain the error detection benefits of synchronous mode
> without the performance downsides. Therefore, make it possible for CPUs
> to opt into upgrading to synchronous mode via a new mte-prefer-sync
> device tree attribute.

As Vincenzo said, there's an ABI change which I don't particularly like.
I think the current PR_MTE_TCF_* should be honoured as they described.
We could introduce a new control, PR_MTE_TCF_DYNAMIC (or a better name)
that would cover both your mixed system or some future scenario where we
want to switch between async and sync (and the new asymmetric mode in
8.7) at run-time via some other control/timer and transparently from the
application. But that would be an application opt-in.

-- 
Catalin



More information about the linux-arm-kernel mailing list