linux_dsm_epyc7002/drivers/infiniband/hw
Tadeusz Struk 584d9577ff IB/hfi1: Fix locking scheme for affinity settings
Existing locking scheme in affinity.c file using the
&node_affinity.lock spinlock is not very elegant.
We acquire the lock to get hfi1_affinity_node entry,
unlock, and then use the entry without the lock held.
With more functions being added, which access and
modify the entries, this can lead to race conditions.
This patch makes this locking scheme more consistent.
It changes the spinlock to mutex. Since all the code
is executed in a user process context there is no need
for a spinlock. This also allows to keep the lock
not only while we look up for the node affinity entry,
but over the whole section where the entry is being used.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Reviewed-by: Jianxin Xiong <jianxin.xiong@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-10-02 08:42:08 -04:00
..
cxgb3 Merge branches 'cxgb4' and 'mlx5' into k.o/for-4.8 2016-08-03 20:58:45 -04:00
cxgb4 IB/cxgb4: Make _free_qp static to silence build warning 2016-09-02 13:46:33 -04:00
hfi1 IB/hfi1: Fix locking scheme for affinity settings 2016-10-02 08:42:08 -04:00
i40iw i40iw: Receive notification events correctly 2016-08-26 09:59:13 -04:00
mlx4 IB/mlx4: Diagnostic HW counters are not supported in slave mode 2016-09-16 14:14:08 -04:00
mlx5 IB/mlx5: Set source mac address in FTE 2016-09-16 14:14:08 -04:00
mthca Merge branches 'misc' and 'rxe' into k.o/for-4.8-1 2016-08-04 11:13:47 -04:00
nes IB/nes: Support device FW version string 2016-06-23 12:08:34 -04:00
ocrdma RDMA/ocrdma: Fix the max_sge reported from FW 2016-08-24 11:31:40 -04:00
qib IB/qib,IB/hfi: Use core common header file 2016-10-02 08:42:06 -04:00
usnic IB/usnic: Fix error return code 2016-08-22 14:31:43 -04:00
Makefile IB/hfi1: Move driver out of staging 2016-05-26 11:35:14 -04:00