iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] iommu: Avoid DMA ops domain refcount contention
@ 2018-09-12 15:24 Robin Murphy
       [not found] ` <cover.1536764440.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
  0 siblings, 1 reply; 20+ messages in thread
From: Robin Murphy @ 2018-09-12 15:24 UTC (permalink / raw)
  To: joro-zLv9SwRftAIdnm+yROfE0A, hch-jcswGhMUV9g
  Cc: guohanjun-hv44wF8Li93QT0dZR+AlfA, catalin.marinas-5wv7dgnIgG8,
	will.deacon-5wv7dgnIgG8, linuxarm-hv44wF8Li93QT0dZR+AlfA,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

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 iommu-dma, but didn't have any way to justify at the
time. However, the reports of 10-25% better networking performance on v1
suggest that it's very worthwhile (and far more significant than I ever
would have guessed).

As far as merging goes, I don't mind at all whether this goes via IOMMU,
or via dma-mapping provided Joerg's happy to ack it.

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(-)

-- 
2.19.0.dirty

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-10-01 10:55 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-12 15:24 [PATCH v2 0/3] iommu: Avoid DMA ops domain refcount contention Robin Murphy
     [not found] ` <cover.1536764440.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2018-09-12 15:24   ` [PATCH v2 1/3] iommu: Add fast hook for getting DMA domains Robin Murphy
2018-09-12 15:24   ` [PATCH v2 2/3] iommu/dma: Use fast DMA domain lookup Robin Murphy
     [not found]     ` <e42771992a73620f23128c0479b2ae91b3e177bf.1536764440.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2018-09-28 13:26       ` Marek Szyprowski
     [not found]         ` <20180928132605eucas1p1d39fedc3be3e4e2c16035c01a40cfab6~Ykz2Rax6e0538205382eucas1p17-MHMrYXj8g+pqW5MlFJXMulaTQe2KTcn/@public.gmane.org>
2018-09-28 13:52           ` Robin Murphy
     [not found]             ` <78a5b373-d569-4461-e258-3104286ba322-5wv7dgnIgG8@public.gmane.org>
2018-09-28 14:21               ` Marek Szyprowski
     [not found]                 ` <20180928142148eucas1p17d6ecbd5c98b3fe1bf008dbcf0626c76~YlkfonoPN1120711207eucas1p1u-MHMrYXj8g+pqW5MlFJXMulaTQe2KTcn/@public.gmane.org>
2018-09-28 15:31                   ` Robin Murphy
     [not found]                     ` <CGME20180928160945eucas1p17ff77fe34854548719880638ecb9c54d@eucas1p1.samsung.com>
2018-09-28 16:09                       ` [PATCH] drm/exynos: Use selected dma_dev default iommu domain instead of a fake one Marek Szyprowski
2018-09-28 16:13                         ` Robin Murphy
     [not found]                     ` <a9eb4b79-1fb8-eec7-0566-966f84022d7b-5wv7dgnIgG8@public.gmane.org>
2018-09-28 15:33                       ` [PATCH v2 2/3] iommu/dma: Use fast DMA domain lookup Christoph Hellwig
     [not found]                         ` <20180928153334.GA9462-jcswGhMUV9g@public.gmane.org>
2018-09-28 15:46                           ` Robin Murphy
2018-09-28 16:18                       ` Marek Szyprowski
2018-10-01 10:55                         ` Inki Dae
2018-09-12 15:24   ` [PATCH v2 3/3] arm64/dma-mapping: Mildly optimise non-coherent IOMMU ops Robin Murphy
2018-09-14 12:48   ` [PATCH v2 0/3] iommu: Avoid DMA ops domain refcount contention Will Deacon
     [not found]     ` <20180914124858.GA4010-5wv7dgnIgG8@public.gmane.org>
2018-09-17 11:20       ` John Garry
     [not found]         ` <dbb9e48f-e31b-b8a1-0287-378c35e9fdb9-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-09-20 12:51           ` John Garry
2018-09-17 13:33       ` Christoph Hellwig
     [not found]         ` <20180917133359.GA972-jcswGhMUV9g@public.gmane.org>
2018-09-18 13:28           ` Tom Murphy
2018-09-25  8:24   ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).