IB/hfi1: Reduce lock contention on iowait_lock for sdma and pio
authorMike Marciniszyn <mike.marciniszyn@intel.com>
Wed, 28 Nov 2018 18:33:00 +0000 (10:33 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 7 Dec 2018 03:15:36 +0000 (20:15 -0700)
commit9aefcabe579bca06325ad9e577a36816f57386ff
tree5d51380942b4dd7b7aa7a2f8b200300f0eec5a28
parent18912c4524385dd6532c682cb9d4f6aa39ba8d47
IB/hfi1: Reduce lock contention on iowait_lock for sdma and pio

Commit 4e045572e2c2 ("IB/hfi1: Add unique txwait_lock for txreq events")
laid the ground work to support per resource waiting locking.

This patch adds that with a lock unique to each sdma engine and pio
sendcontext and makes necessary changes for verbs, PSM, and vnic to use
the new locks.

This is particularly beneficial for smaller messages that will exhaust
resources at a faster rate.

Fixes: 7724105686e7 ("IB/hfi1: add driver files")
Reviewed-by: Gary Leshner <Gary.S.Leshner@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/pio.c
drivers/infiniband/hw/hfi1/pio.h
drivers/infiniband/hw/hfi1/qp.c
drivers/infiniband/hw/hfi1/sdma.c
drivers/infiniband/hw/hfi1/sdma.h
drivers/infiniband/hw/hfi1/user_sdma.c
drivers/infiniband/hw/hfi1/verbs.c
drivers/infiniband/hw/hfi1/vnic_sdma.c