linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 1/1] iommu: set the default iommu-dma mode as non-strict
@ 2019-01-31 13:52 Zhen Lei
  2019-01-31 14:55 ` Jean-Philippe Brucker
  0 siblings, 1 reply; 9+ messages in thread
From: Zhen Lei @ 2019-01-31 13:52 UTC (permalink / raw)
  To: John Garry, Robin Murphy, Will Deacon, Joerg Roedel,
	linux-arm-kernel, iommu, linux-kernel
  Cc: Zhen Lei, Yunsheng Lin

Currently, many peripherals are faster than before. For example, the top
speed of the older netcard is 10Gb/s, and now it's more than 25Gb/s. But
when iommu page-table mapping enabled, it's hard to reach the top speed
in strict mode, because of frequently map and unmap operations. In order
to keep abreast of the times, I think it's better to set non-strict as
default.

Below it's our iperf performance data of 25Gb netcard:
strict mode: 18-20 Gb/s
non-strict mode: 23.5 Gb/s

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 Documentation/admin-guide/kernel-parameters.txt | 4 ++--
 drivers/iommu/iommu.c                           | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index b799bcf..667221f 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1779,13 +1779,13 @@

 	iommu.strict=	[ARM64] Configure TLB invalidation behaviour
 			Format: { "0" | "1" }
-			0 - Lazy mode.
+			0 - Lazy mode (default).
 			  Request that DMA unmap operations use deferred
 			  invalidation of hardware TLBs, for increased
 			  throughput at the cost of reduced device isolation.
 			  Will fall back to strict mode if not supported by
 			  the relevant IOMMU driver.
-			1 - Strict mode (default).
+			1 - Strict mode.
 			  DMA unmap operations invalidate IOMMU hardware TLBs
 			  synchronously.

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 3ed4db3..10e0b49 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -43,7 +43,7 @@
 #else
 static unsigned int iommu_def_domain_type = IOMMU_DOMAIN_DMA;
 #endif
-static bool iommu_dma_strict __read_mostly = true;
+static bool iommu_dma_strict __read_mostly;

 struct iommu_callback_data {
 	const struct iommu_ops *ops;
--
1.8.3



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-06 12:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 13:52 [PATCH RFC 1/1] iommu: set the default iommu-dma mode as non-strict Zhen Lei
2019-01-31 14:55 ` Jean-Philippe Brucker
2019-02-26 12:36   ` Hanjun Guo
2019-03-01  4:44     ` Leizhen (ThunderTown)
2019-03-01 11:07       ` Jean-Philippe Brucker
2019-03-02  6:12         ` Leizhen (ThunderTown)
2019-03-04 15:52           ` Robin Murphy
2019-03-06 11:06             ` Leizhen (ThunderTown)
2019-03-06 12:07               ` John Garry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).