1
0
Fork 0
remarkable-linux/include/rdma
Sebastian Sanchez 964705c4a6 IB/hfi1: Optimize kthread pointer locking when queuing CQ entries
commit af8aab7137 upstream.

All threads queuing CQ entries on different CQs are unnecessarily
synchronized by a spin lock to check if the CQ kthread worker hasn't
been destroyed before queuing an CQ entry.

The lock used in 6efaf10f16 ("IB/rdmavt: Avoid queuing work into a
destroyed cq kthread worker") is a device global lock and will have
poor performance at scale as completions are entered from a large
number of CPUs.

Convert to use RCU where the read side of RCU is rvt_cq_enter() to
determine that the worker is alive prior to triggering the
completion event.
Apply write side RCU semantics in rvt_driver_cq_init() and
rvt_cq_exit().

Fixes: 6efaf10f16 ("IB/rdmavt: Avoid queuing work into a destroyed cq kthread worker")
Cc: <stable@vger.kernel.org> # 4.14.x
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-03 11:24:54 +02:00
..
ib.h new helper: uaccess_kernel() 2017-03-28 16:43:25 -04:00
ib_addr.h RDMA/ucma: Introduce safer rdma_addr_size() variants 2018-04-08 14:26:29 +02:00
ib_cache.h RDMA/core: export ib_get_cached_port_state 2017-01-12 23:00:00 -05:00
ib_cm.h IB/SA: Rename ib_sa_path_rec to sa_path_rec 2017-05-01 14:37:28 -04:00
ib_fmr_pool.h RDMA: Improve include file coding style 2008-07-14 23:48:44 -07:00
ib_hdrs.h IB/hfi1: Add functions to parse BTH/IB headers 2017-06-27 16:56:33 -04:00
ib_mad.h IB/core: Enforce security on management datagrams 2017-05-23 12:27:21 -04:00
ib_marshall.h IB/core: Convert ah_attr from OPA to IB when copying to user 2017-08-08 14:47:18 -04:00
ib_pack.h IB/core: Fix calculation of maximum RoCE MTU 2017-12-20 10:10:35 +01:00
ib_pma.h IB/core: Display extended counter set if available 2015-12-23 15:58:30 -05:00
ib_sa.h RDMA/SA: Fix kernel panic in CMA request handler flow 2017-06-01 17:20:14 -04:00
ib_smi.h IB/core: Move SM class defines from ib_mad.h to ib_smi.h 2015-09-03 15:50:32 -04:00
ib_umem.h IB/umem: Use the correct mm during ib_umem_release 2018-05-30 07:51:49 +02:00
ib_umem_odp.h lib/interval_tree: fast overlap detection 2017-09-08 18:26:49 -07:00
ib_verbs.h IB/core: Make testing MR flags for writability a static inline function 2018-07-03 11:24:53 +02:00
iw_cm.h rdma_cm: add rdma_reject_msg() helper function 2016-12-14 11:38:28 -05:00
iw_portmap.h RDMA/core: Enable the iWarp Port Mapper to provide the actual address of the connecting peer to its clients 2015-05-05 09:18:01 -04:00
mr_pool.h IB/core: add a simple MR pool 2016-05-13 13:37:18 -04:00
opa_addr.h IB/hfi1: Add 16B UD support 2017-08-22 14:22:37 -04:00
opa_port_info.h IB/hfi1: Virtual Network Interface Controller (VNIC) HW support 2017-04-20 15:19:35 -04:00
opa_smi.h IB/mad: Eliminate redundant SM class version defines for OPA 2016-12-14 11:01:58 -05:00
opa_vnic.h IB/hfi1: Add support to receive 16B bypass packets 2017-08-22 14:22:37 -04:00
rdma_cm.h IB/SA: Rename ib_sa_path_rec to sa_path_rec 2017-05-01 14:37:28 -04:00
rdma_cm_ib.h IB/SA: Rename ib_sa_path_rec to sa_path_rec 2017-05-01 14:37:28 -04:00
rdma_netlink.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rdma_vt.h IB/hfi1: Optimize kthread pointer locking when queuing CQ entries 2018-07-03 11:24:54 +02:00
rdmavt_cq.h IB/rdmavt: Add completion queue functions 2016-03-10 20:37:24 -05:00
rdmavt_mr.h IB/rdmavt: Handle dereg of inuse MRs properly 2017-08-28 19:12:31 -04:00
rdmavt_qp.h IB/rdmavt: Handle dereg of inuse MRs properly 2017-08-28 19:12:31 -04:00
rw.h rdma core: Add rdma_rw_mr_payload() 2017-09-05 15:15:30 -04:00
uverbs_ioctl.h IB/core: Assign root to all drivers 2017-08-31 08:35:14 -04:00
uverbs_std_types.h IB/core: Assign root to all drivers 2017-08-31 08:35:14 -04:00
uverbs_types.h IB/core: Explicitly destroy an object while keeping uobject 2017-08-31 08:35:11 -04:00