diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2018-11-28 21:33:00 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-12-07 06:15:36 +0300 |
commit | 9aefcabe579bca06325ad9e577a36816f57386ff (patch) | |
tree | 5d51380942b4dd7b7aa7a2f8b200300f0eec5a28 /drivers/infiniband/hw/hfi1/pio.h | |
parent | 18912c4524385dd6532c682cb9d4f6aa39ba8d47 (diff) | |
download | linux-9aefcabe579bca06325ad9e577a36816f57386ff.tar.xz |
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>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/pio.h')
-rw-r--r-- | drivers/infiniband/hw/hfi1/pio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/pio.h b/drivers/infiniband/hw/hfi1/pio.h index bf1afb0077a7..c9a58b642bdd 100644 --- a/drivers/infiniband/hw/hfi1/pio.h +++ b/drivers/infiniband/hw/hfi1/pio.h @@ -127,6 +127,8 @@ struct send_context { volatile __le64 *hw_free; /* HW free counter */ /* list for PIO waiters */ struct list_head piowait ____cacheline_aligned_in_smp; + seqlock_t waitlock; + spinlock_t credit_ctrl_lock ____cacheline_aligned_in_smp; u32 credit_intr_count; /* count of credit intr users */ u64 credit_ctrl; /* cache for credit control */ |