MTK_IOMMU: Optimize mapping / unmapping performance
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | iommu: Introduce iotlb_sync_range callbackdrivers/ drivers/ include/ | +18 | 0 replies | |
| 2/4 | iommu/mediatek: Add iotlb_sync_range() supportdrivers/ | +6 | 4 replies | |
| 3/4 | iommu/mediatek: Remove unnecessary tlb syncdrivers/ | +4 | 0 replies | |
| 4/4 | iommu/mediatek: Adjust iotlb_sync_rangedrivers/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] MTK_IOMMU: Optimize mapping / unmapping performance
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() withiotlb_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