Skip to content

iommu: Avoid DMA ops domain refcount contention

Robin Murphy linux-arm-kernel linux-iommu 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iommu: Add fast hook for getting DMA domainsdrivers/iommu/iommu.c include/linux/iommu.h+10 -02 replies
1/3iommu: Add fast hook for getting DMA domains+0 -00 replies
2/3iommu/dma: Use fast DMA domain lookupdrivers/iommu/dma-iommu.c+12 -110 replies
3/3arm64/dma-mapping: Mildly optimise non-coherent IOMMU opsarch/arm64/mm/dma-mapping.c+5 -50 replies
3/3arm64/dma-mapping: Mildly optimise non-coherent IOMMU ops+0 -00 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchWill Deacon
SeriesA-b
1/3
1/3
2/3
3/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] iommu: Avoid DMA ops domain refcount contention

John raised the issue[1] that we have some unnecessary refcount contention in the DMA ops path which shows scalability problems now that we have more real high-performance hardware using iommu-dma. The x86 IOMMU drivers are sidestepping this by stashing domain references in archdata, but since that's not very nice for architecture-agnostic code, I think it's time to look at a generic API-level solution.

These are a couple of quick patches based on the idea I had back when first implementing this lot, but didn't have any way to justify at the time. The third patch can be ignored for the sake of API discussion, but is included for completeness.

Robin.

[1] https://lists.linuxfoundation.org/pipermail/iommu/2018-August/029303.html

Robin Murphy (3):
iommu: Add fast hook for getting DMA domains iommu/dma: Use fast DMA domain lookup arm64/dma-mapping: Mildly optimise non-coherent IOMMU ops

 arch/arm64/mm/dma-mapping.c | 10 +++++-----
 drivers/iommu/dma-iommu.c   | 23 ++++++++++++-----------
 drivers/iommu/iommu.c       |  9 +++++++++
 include/linux/iommu.h       |  1 +
 4 files changed, 27 insertions(+), 16 deletions(-)
Signature · 1 line
2.17.1.dirty