From: Chao Hao <chao.hao@mediatek.com>
To: Joerg Roedel <joro@8bytes.org>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: <iommu@lists.linux-foundation.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>, <wsd_upstream@mediatek.com>,
Yong Wu <yong.wu@mediatek.com>, FY Yang <fy.yang@mediatek.com>,
Jun Wen <jun.wen@mediatek.com>,
Mingyuan Ma <mingyuan.ma@mediatek.com>,
Chao Hao <chao.hao@mediatek.com>
Subject: [PATCH 0/4] MTK_IOMMU: Optimize mapping / unmapping performance
Date: Mon, 19 Oct 2020 19:30:56 +0800 [thread overview]
Message-ID: <20201019113100.23661-1-chao.hao@mediatek.com> (raw)
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
next reply other threads:[~2020-10-19 11:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 11:30 Chao Hao [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201019113100.23661-1-chao.hao@mediatek.com \
--to=chao.hao@mediatek.com \
--cc=fy.yang@mediatek.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joro@8bytes.org \
--cc=jun.wen@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mingyuan.ma@mediatek.com \
--cc=wsd_upstream@mediatek.com \
--cc=yong.wu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox