Re: [PATCH RFC 2/8] iommu/arm-smmu-v3: Add and use static helper function arm_smmu_cmdq_issue_cmd_with_sync()

2021-08-11 Thread John Garry
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 --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git

Re: [PATCH RFC 2/8] iommu/arm-smmu-v3: Add and use static helper function arm_smmu_cmdq_issue_cmd_with_sync()

2021-08-11 Thread Will Deacon
On Wed, Aug 11, 2021 at 11:31:08AM +0100, John Garry wrote: > > > > > 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

Re: [PATCH RFC 2/8] iommu/arm-smmu-v3: Add and use static helper function arm_smmu_cmdq_issue_cmd_with_sync()

2021-08-11 Thread John Garry
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

Re: [PATCH RFC 2/8] iommu/arm-smmu-v3: Add and use static helper function arm_smmu_cmdq_issue_cmd_with_sync()

2021-08-11 Thread Will Deacon
On Wed, Aug 11, 2021 at 10:16:39AM +0800, Leizhen (ThunderTown) wrote: > > > On 2021/8/11 2:24, Will Deacon wrote: > > On Sat, Jun 26, 2021 at 07:01:24PM +0800, Zhen Lei wrote: > >> The obvious key to the performance optimization of commit 587e6c10a7ce > >> ("iommu/arm-smmu-v3: Reduce contention

Re: [PATCH RFC 2/8] iommu/arm-smmu-v3: Add and use static helper function arm_smmu_cmdq_issue_cmd_with_sync()

2021-08-10 Thread Leizhen (ThunderTown)
On 2021/8/11 2:24, Will Deacon wrote: > On Sat, Jun 26, 2021 at 07:01:24PM +0800, Zhen Lei wrote: >> The obvious key to the performance optimization of commit 587e6c10a7ce >> ("iommu/arm-smmu-v3: Reduce contention during command-queue insertion") is >> to allow multiple cores to insert commands

Re: [PATCH RFC 2/8] iommu/arm-smmu-v3: Add and use static helper function arm_smmu_cmdq_issue_cmd_with_sync()

2021-08-10 Thread Will Deacon
On Sat, Jun 26, 2021 at 07:01:24PM +0800, Zhen Lei wrote: > The obvious key to the performance optimization of commit 587e6c10a7ce > ("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.

[PATCH RFC 2/8] iommu/arm-smmu-v3: Add and use static helper function arm_smmu_cmdq_issue_cmd_with_sync()

2021-06-26 Thread Zhen Lei
The obvious key to the performance optimization of commit 587e6c10a7ce ("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