diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2013-06-04 15:05:37 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-06-21 20:19:49 -0400 |
commit | 85caafe307a06e4f9993c8f3c994a07374c07831 (patch) | |
tree | c17964cc02d75f2bb6f827eed9daeec719b85d17 /drivers/infiniband/hw/qib/qib_init.c | |
parent | c804f07248895ff9c9dccb6cda703068a0657b6c (diff) |
IB/qib: Optimize CQ callbacks
The current workqueue implemention has the following performance
deficiencies on QDR HCAs:
- The CQ call backs tend to run on the CPUs processing the
receive queues
- The single thread queue isn't optimal for multiple HCAs
This patch adds a dedicated per HCA bound thread to process CQ callbacks.
Reviewed-by: Ramkrishna Vepa <ramkrishna.vepa@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_init.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_init.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index e02217b5c46d..ff36903474ea 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c | |||
@@ -97,8 +97,6 @@ unsigned qib_wc_pat = 1; /* default (1) is to use PAT, not MTRR */ | |||
97 | module_param_named(wc_pat, qib_wc_pat, uint, S_IRUGO); | 97 | module_param_named(wc_pat, qib_wc_pat, uint, S_IRUGO); |
98 | MODULE_PARM_DESC(wc_pat, "enable write-combining via PAT mechanism"); | 98 | MODULE_PARM_DESC(wc_pat, "enable write-combining via PAT mechanism"); |
99 | 99 | ||
100 | struct workqueue_struct *qib_cq_wq; | ||
101 | |||
102 | static void verify_interrupt(unsigned long); | 100 | static void verify_interrupt(unsigned long); |
103 | 101 | ||
104 | static struct idr qib_unit_table; | 102 | static struct idr qib_unit_table; |
@@ -445,6 +443,7 @@ static int loadtime_init(struct qib_devdata *dd) | |||
445 | dd->intrchk_timer.function = verify_interrupt; | 443 | dd->intrchk_timer.function = verify_interrupt; |
446 | dd->intrchk_timer.data = (unsigned long) dd; | 444 | dd->intrchk_timer.data = (unsigned long) dd; |
447 | 445 | ||
446 | ret = qib_cq_init(dd); | ||
448 | done: | 447 | done: |
449 | return ret; | 448 | return ret; |
450 | } | 449 | } |
@@ -1215,12 +1214,6 @@ static int __init qlogic_ib_init(void) | |||
1215 | if (ret) | 1214 | if (ret) |
1216 | goto bail; | 1215 | goto bail; |
1217 | 1216 | ||
1218 | qib_cq_wq = create_singlethread_workqueue("qib_cq"); | ||
1219 | if (!qib_cq_wq) { | ||
1220 | ret = -ENOMEM; | ||
1221 | goto bail_dev; | ||
1222 | } | ||
1223 | |||
1224 | /* | 1217 | /* |
1225 | * These must be called before the driver is registered with | 1218 | * These must be called before the driver is registered with |
1226 | * the PCI subsystem. | 1219 | * the PCI subsystem. |
@@ -1233,7 +1226,7 @@ static int __init qlogic_ib_init(void) | |||
1233 | ret = pci_register_driver(&qib_driver); | 1226 | ret = pci_register_driver(&qib_driver); |
1234 | if (ret < 0) { | 1227 | if (ret < 0) { |
1235 | pr_err("Unable to register driver: error %d\n", -ret); | 1228 | pr_err("Unable to register driver: error %d\n", -ret); |
1236 | goto bail_unit; | 1229 | goto bail_dev; |
1237 | } | 1230 | } |
1238 | 1231 | ||
1239 | /* not fatal if it doesn't work */ | 1232 | /* not fatal if it doesn't work */ |
@@ -1241,13 +1234,11 @@ static int __init qlogic_ib_init(void) | |||
1241 | pr_err("Unable to register ipathfs\n"); | 1234 | pr_err("Unable to register ipathfs\n"); |
1242 | goto bail; /* all OK */ | 1235 | goto bail; /* all OK */ |
1243 | 1236 | ||
1244 | bail_unit: | 1237 | bail_dev: |
1245 | #ifdef CONFIG_INFINIBAND_QIB_DCA | 1238 | #ifdef CONFIG_INFINIBAND_QIB_DCA |
1246 | dca_unregister_notify(&dca_notifier); | 1239 | dca_unregister_notify(&dca_notifier); |
1247 | #endif | 1240 | #endif |
1248 | idr_destroy(&qib_unit_table); | 1241 | idr_destroy(&qib_unit_table); |
1249 | destroy_workqueue(qib_cq_wq); | ||
1250 | bail_dev: | ||
1251 | qib_dev_cleanup(); | 1242 | qib_dev_cleanup(); |
1252 | bail: | 1243 | bail: |
1253 | return ret; | 1244 | return ret; |
@@ -1273,8 +1264,6 @@ static void __exit qlogic_ib_cleanup(void) | |||
1273 | #endif | 1264 | #endif |
1274 | pci_unregister_driver(&qib_driver); | 1265 | pci_unregister_driver(&qib_driver); |
1275 | 1266 | ||
1276 | destroy_workqueue(qib_cq_wq); | ||
1277 | |||
1278 | qib_cpulist_count = 0; | 1267 | qib_cpulist_count = 0; |
1279 | kfree(qib_cpulist); | 1268 | kfree(qib_cpulist); |
1280 | 1269 | ||
@@ -1365,6 +1354,7 @@ static void cleanup_device_data(struct qib_devdata *dd) | |||
1365 | } | 1354 | } |
1366 | kfree(tmp); | 1355 | kfree(tmp); |
1367 | kfree(dd->boardname); | 1356 | kfree(dd->boardname); |
1357 | qib_cq_exit(dd); | ||
1368 | } | 1358 | } |
1369 | 1359 | ||
1370 | /* | 1360 | /* |