aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@mellanox.co.il>2006-04-05 08:47:16 -0400
committerRoland Dreier <rolandd@cisco.com>2006-04-10 12:43:58 -0400
commitabf45dbb5b256dab439ca3b6b71191ecfddf9cb6 (patch)
treec2b95e3e911f6c8649c84c196de8b399cf7db269 /drivers/infiniband
parent0f4852513fb07405ce88da40d8c497060561246e (diff)
IB/mthca: Disable tuning PCI read burst size
The PCI spec recommends against drivers playing with a device's PCI read burst size, and says that systems software should configure it. And we actually have users that report that changing it from the default set by BIOS hurts performance and/or stability for them. On the other hand, the Mellanox Programmer's Reference Manual 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, 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@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index 0dc5b8da0007..7e9c97b09404 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -77,6 +77,10 @@ MODULE_PARM_DESC(msi, "attempt to use MSI if nonzero");
77 77
78#endif /* CONFIG_PCI_MSI */ 78#endif /* CONFIG_PCI_MSI */
79 79
80static int tune_pci = 0;
81module_param(tune_pci, int, 0444);
82MODULE_PARM_DESC(tune_pci, "increase PCI burst from the default set by BIOS if nonzero");
83
80static const char mthca_version[] __devinitdata = 84static const char mthca_version[] __devinitdata =
81 DRV_NAME ": Mellanox InfiniBand HCA driver v" 85 DRV_NAME ": Mellanox InfiniBand HCA driver v"
82 DRV_VERSION " (" DRV_RELDATE ")\n"; 86 DRV_VERSION " (" DRV_RELDATE ")\n";
@@ -98,6 +102,9 @@ static int __devinit mthca_tune_pci(struct mthca_dev *mdev)
98 int cap; 102 int cap;
99 u16 val; 103 u16 val;
100 104
105 if (!tune_pci)
106 return 0;
107
101 /* First try to max out Read Byte Count */ 108 /* First try to max out Read Byte Count */
102 cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX); 109 cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX);
103 if (cap) { 110 if (cap) {