iommu/arm-smmu-v3: permit users to disable msi polling
authorBarry Song <song.bao.hua@hisilicon.com>
Thu, 27 Aug 2020 09:29:57 +0000 (21:29 +1200)
committerWill Deacon <will@kernel.org>
Mon, 7 Sep 2020 13:17:17 +0000 (14:17 +0100)
commitbd07a20a38b6598dc09f5543eb03710e807cb429
tree3dbea0cc5e4f86212b4d7bd443029491d88af53f
parent9305d02adcc14adc0f4e7d5ad0c370174923e6dc
iommu/arm-smmu-v3: permit users to disable msi polling

Polling by MSI isn't necessarily faster than polling by SEV. Tests on
hi1620 show hns3 100G NIC network throughput can improve from 25G to
27G if we disable MSI polling while running 16 netperf threads sending
UDP packets in size 32KB. TX throughput can improve from 7G to 7.7G for
single thread.
The reason for the throughput improvement is that the latency to poll
the completion of CMD_SYNC becomes smaller. After sending a CMD_SYNC
in an empty cmd queue, typically we need to wait for 280ns using MSI
polling. But we only need around 190ns after disabling MSI polling.
This patch provides a command line option so that users can decide to
use MSI polling or not based on their tests.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20200827092957.22500-4-song.bao.hua@hisilicon.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c