Re: [PATCH 1/4] iommu/arm-smmu-v3: Use command queue batching helpers to improve performance

2021-08-16 Thread Leizhen (ThunderTown)
On 2021/8/16 16:21, Will Deacon wrote: > On Mon, Aug 16, 2021 at 03:47:58PM +0800, Leizhen (ThunderTown) wrote: >> >> >> On 2021/8/16 15:24, John Garry wrote: In addition, I find that function arm_smmu_cmdq_build_cmd() can also be optimized slightly, three useless instructions

Re: [PATCH 1/4] iommu/arm-smmu-v3: Use command queue batching helpers to improve performance

2021-08-16 Thread Will Deacon
On Mon, Aug 16, 2021 at 03:47:58PM +0800, Leizhen (ThunderTown) wrote: > > > On 2021/8/16 15:24, John Garry wrote: > >> In addition, I find that function arm_smmu_cmdq_build_cmd() can also be > >> optimized > >> slightly, three useless instructions can be reduced. > > > > I think that you

Re: [PATCH 1/4] iommu/arm-smmu-v3: Use command queue batching helpers to improve performance

2021-08-16 Thread Leizhen (ThunderTown)
On 2021/8/16 15:24, John Garry wrote: >> In addition, I find that function arm_smmu_cmdq_build_cmd() can also be >> optimized >> slightly, three useless instructions can be reduced. > > I think that you could optimise further by pre-building commonly used > commands. > > For example,

Re: [PATCH 1/4] iommu/arm-smmu-v3: Use command queue batching helpers to improve performance

2021-08-16 Thread John Garry
In addition, I find that function arm_smmu_cmdq_build_cmd() can also be optimized slightly, three useless instructions can be reduced. I think that you could optimise further by pre-building commonly used commands. For example, CMD_SYNC without MSI polling is always the same. And then only

Re: [PATCH 1/4] iommu/arm-smmu-v3: Use command queue batching helpers to improve performance

2021-08-15 Thread Leizhen (ThunderTown)
On 2021/8/16 10:15, Leizhen (ThunderTown) wrote: > > > On 2021/8/14 0:45, John Garry wrote: >> On 13/08/2021 17:01, Robin Murphy wrote: diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index

Re: [PATCH 1/4] iommu/arm-smmu-v3: Use command queue batching helpers to improve performance

2021-08-15 Thread Leizhen (ThunderTown)
On 2021/8/14 0:45, John Garry wrote: > On 13/08/2021 17:01, Robin Murphy wrote: >>> >>> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c >>> b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c >>> index 235f9bdaeaf223b..c81cd929047f573 100644 >>> ---

Re: [PATCH 1/4] iommu/arm-smmu-v3: Use command queue batching helpers to improve performance

2021-08-13 Thread John Garry
On 13/08/2021 17:01, Robin Murphy wrote: diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 235f9bdaeaf223b..c81cd929047f573 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@

Re: [PATCH 1/4] iommu/arm-smmu-v3: Use command queue batching helpers to improve performance

2021-08-13 Thread Robin Murphy
On 2021-08-11 12:48, 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. Obviously, inserting as

[PATCH 1/4] iommu/arm-smmu-v3: Use command queue batching helpers to improve performance

2021-08-11 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