Message ID | 20210630231509.3773172-1-pcc@google.com (mailing list archive) |
---|---|
Headers | show |
Series | arm64: mte: allow async MTE to be upgraded to sync on a per-CPU basis | expand |
On Wed, Jun 30, 2021 at 04:15:05PM -0700, Peter Collingbourne wrote: > On some CPUs the performance of MTE in synchronous mode is similar > to 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 > user programs to opt into upgrading to synchronous mode on those CPUs. > > This is done by introducing a notion of a preferred TCF mode, which is > controlled on a per-CPU basis by a sysfs node. The existing SYNC and > ASYNC TCF settings are repurposed as bitfields that specify a set of > possible modes. If the preferred TCF mode for a particular CPU is in > the user-provided mode set (this will always be the case for mode sets > containing more than one mode because the kernel only supports two tag > checking modes, but future kernels may support more modes) then that > mode is used when running on that CPU, otherwise one of the modes in > the task's mode set will be selected in a currently unspecified manner. The series looks good to me but please post it again after -rc1 if it doesn't apply cleanly. Thanks.
On Thu, Jul 1, 2021 at 10:10 AM Catalin Marinas <catalin.marinas@arm.com> wrote: > > On Wed, Jun 30, 2021 at 04:15:05PM -0700, Peter Collingbourne wrote: > > On some CPUs the performance of MTE in synchronous mode is similar > > to 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 > > user programs to opt into upgrading to synchronous mode on those CPUs. > > > > This is done by introducing a notion of a preferred TCF mode, which is > > controlled on a per-CPU basis by a sysfs node. The existing SYNC and > > ASYNC TCF settings are repurposed as bitfields that specify a set of > > possible modes. If the preferred TCF mode for a particular CPU is in > > the user-provided mode set (this will always be the case for mode sets > > containing more than one mode because the kernel only supports two tag > > checking modes, but future kernels may support more modes) then that > > mode is used when running on that CPU, otherwise one of the modes in > > the task's mode set will be selected in a currently unspecified manner. > > The series looks good to me but please post it again after -rc1 if it > doesn't apply cleanly. Thanks. I tried applying this series to linux-next and it applied cleanly, so it seems likely that it will apply cleanly to rc1. I will let you know if that is not the case though. I received feedback elsewhere that we should be adding documentation under Documentation/ABI for the new sysfs node. Also while developing my GCR on task switch patch I noticed a small cleanup that could be made to patch 2 of this series. I went ahead and made both of those improvements in v9. Peter