iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] MTK_IOMMU: Optimize mapping / unmapping performance
@ 2020-10-19 11:30 Chao Hao
  2020-10-19 11:30 ` [PATCH 1/4] iommu: Introduce iotlb_sync_range callback Chao Hao
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Chao Hao @ 2020-10-19 11:30 UTC (permalink / raw)
  To: Joerg Roedel, Matthias Brugger
  Cc: Jun Wen, FY Yang, wsd_upstream, linux-kernel, Chao Hao, iommu,
	linux-mediatek, linux-arm-kernel, Mingyuan Ma

    For MTK platforms, mtk_iommu is using iotlb_sync(), tlb_add_range() and tlb_flush_walk/leaf()
to do tlb sync when iommu driver runs iova mapping/unmapping. But if buffer size is large,
it maybe consist of many pages(4K/8K/64K/1MB......). So iommu driver maybe run many times tlb
sync in mapping for this case and it will degrade performance seriously. In order to resolve the
issue, we hope to add iotlb_sync_range() callback in iommu_ops, it can appiont iova and size to
do tlb sync. MTK_IOMMU will use iotlb_sync_range() callback when the whole mapping/unmapping is
completed and remove iotlb_sync(), tlb_add_range() and tlb_flush_walk/leaf().
    So this patchset will replace iotlb_sync(), tlb_add_range() and tlb_flush_walk/leaf() with
iotlb_sync_range() callback.

Chao Hao (4):
  iommu: Introduce iotlb_sync_range callback
  iommu/mediatek: Add iotlb_sync_range() support
  iommu/mediatek: Remove unnecessary tlb sync
  iommu/mediatek: Adjust iotlb_sync_range

    drivers/iommu/dma-iommu.c |  9 +++++++++
    drivers/iommu/iommu.c     |  7 +++++++
    drivers/iommu/mtk_iommu.c | 36 ++++++++----------------------------
    include/linux/iommu.h     |  2 ++
    4 files changed, 26 insertions(+), 28 deletions(-)

--
2.18.0
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2020-10-23 16:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-19 11:30 [PATCH 0/4] MTK_IOMMU: Optimize mapping / unmapping performance Chao Hao
2020-10-19 11:30 ` [PATCH 1/4] iommu: Introduce iotlb_sync_range callback Chao Hao
2020-10-19 11:30 ` [PATCH 2/4] iommu/mediatek: Add iotlb_sync_range() support Chao Hao
2020-10-21 16:55   ` Robin Murphy
2020-10-23  5:57     ` chao hao
2020-10-23  6:04       ` chao hao
2020-10-23 16:07       ` Robin Murphy
2020-10-19 11:30 ` [PATCH 3/4] iommu/mediatek: Remove unnecessary tlb sync Chao Hao
2020-10-19 11:31 ` [PATCH 4/4] iommu/mediatek: Adjust iotlb_sync_range Chao Hao

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