[openib-general] [PATCH] mthca: disable pci_tune

Michael S. Tsirkin mst at mellanox.co.il
Wed Apr 5 05:47:16 PDT 2006


Roland, here's a patch for stability problems with mthca that were reported to
Mellanox by some of our customers.  I know how you think about options, and I
agree, but this seems the best we can do in this case: it seems too risky
to remove this tuning outright.


---

PCI spec recommends against drivers playing with PCI read burst size, and says
that systems software should configure it. And we actually have customers that
report that changing it from the default set by BIOS hurts performance and/or
stability for them.  On the other hand, PRM recommends turning it up all the
way to the maximum value.  Some tests conducted here in the lab do not show
performance improvement from this tuning, but this might be just me.

As a work-around, lets make this tuning an option, off by default (safe value),
with an eye towards removing it completely one day if no one complains.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: openib/drivers/infiniband/hw/mthca/mthca_main.c
===================================================================
--- openib.orig/drivers/infiniband/hw/mthca/mthca_main.c	2006-04-05 14:47:59.000000000 +0300
+++ openib/drivers/infiniband/hw/mthca/mthca_main.c	2006-04-05 14:57:21.000000000 +0300
@@ -69,6 +69,10 @@ MODULE_PARM_DESC(msi, "attempt to use MS
 
 #endif /* CONFIG_PCI_MSI */
 
+static int tune_pci = 0;
+module_param(tune_pci, int, 0444);
+MODULE_PARM_DESC(tune_pci, "increase PCI burst from the default set by BIOS");
+
 static const char mthca_version[] __devinitdata =
 	DRV_NAME ": Mellanox InfiniBand HCA driver v"
 	DRV_VERSION " (" DRV_RELDATE ")\n";
@@ -90,6 +94,9 @@ static int __devinit mthca_tune_pci(stru
 	int cap;
 	u16 val;
 
+	if (!tune_pci)
+		return 0;
+
 	/* First try to max out Read Byte Count */
 	cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX);
 	if (cap) {

-- 
MST



More information about the general mailing list