]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm-smmu-v3: Add and use static helper function arm_smmu_cmdq_issue_cmd_with_sync()
authorZhen Lei <thunder.leizhen@huawei.com>
Wed, 11 Aug 2021 11:48:50 +0000 (19:48 +0800)
committerWill Deacon <will@kernel.org>
Fri, 13 Aug 2021 13:17:16 +0000 (14:17 +0100)
commit7acf9fe07f3032c313a6a99a1bcb569ce506f381
tree88d40e19c0855c55209055fd13d29030a9fcdfff
parent86b039031c5818f5bbef78ca785f730ce85bfe74
iommu/arm-smmu-v3: Add and use static helper function arm_smmu_cmdq_issue_cmd_with_sync()

The obvious key to the performance optimization of commit e51db8bc3cac
("iommu/arm-smmu-v3: Reduce contention during command-queue insertion") is
to allow multiple cores to insert commands in parallel after a brief mutex
contention.

Obviously, inserting as many commands at a time as possible can reduce the
number of times the mutex contention participates, thereby improving the
overall performance. At least it reduces the number of calls to function
arm_smmu_cmdq_issue_cmdlist().

Therefore, function arm_smmu_cmdq_issue_cmd_with_sync() is added to insert
the 'cmd+sync' commands at a time.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20210811114852.2429-3-thunder.leizhen@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c