1
0
Fork 0
remarkable-linux/include
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
..
acpi ACPI / EC: Fix regression related to PM ops support in ECDT device 2017-12-05 11:26:33 +01:00
asm-generic bug.h: work around GCC PR82365 in BUG() 2018-05-30 07:52:00 +02:00
clocksource License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
crypto crypto: af_alg - Fix race around ctx->rcvused by making it atomic_t 2018-03-03 10:24:29 +01:00
drm drm/syncobj: Stop reusing the same struct file for all syncobj -> fd 2018-03-28 18:24:47 +02:00
dt-bindings dt-bindings: clock: mediatek: add binding for fixed-factor clock axisel_d4 2018-04-24 09:36:34 +02:00
keys License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kvm arm/arm64: KVM: Add PSCI version selection API 2018-05-01 12:58:27 -07:00
linux branch-check: fix long->int truncation when profiling branches 2018-07-03 11:24:49 +02:00
math-emu
media License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memory
misc
net udp: fix rx queue len reported by diag and proc interface 2018-06-26 08:06:28 +08:00
pcmcia
ras License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rdma IB/hfi1: Optimize kthread pointer locking when queuing CQ entries 2018-07-03 11:24:54 +02:00
scsi scsi: core: Make SCSI Status CONDITION MET equivalent to GOOD 2018-05-25 16:17:50 +02:00
soc soc: bcm2835: Make !RASPBERRYPI_FIRMWARE dummies return failure 2018-06-21 04:02:42 +09:00
sound ALSA: control: Hardening for potential Spectre v1 2018-05-01 12:58:16 -07:00
target target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2017-11-30 08:40:51 +00:00
trace tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all} 2018-05-22 18:53:57 +02:00
uapi btrfs: define SUPER_FLAG_METADUMP_V2 2018-06-11 22:49:18 +02:00
video License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen xen/balloon: Mark unallocated host memory as UNUSABLE 2018-03-03 10:24:28 +01:00