linux_dsm_epyc7002/drivers/infiniband/hw/hfi1
Kaike Wan bcad29137a IB/hfi1: Serve the most starved iowait entry first
When an egress resource(SDMA descriptors, pio credits) is not available,
a sending thread will be put on the resource's wait queue. When the
resource becomes available again, up to a fixed number of sending threads
can be awakened sequentially and removed from the wait queue, depending
on the number of waiting threads and the number of free resources. Since
each awakened sending thread will send as many packets as possible, it
is highly likely that the first sending thread will consume all the
egress resources. Subsequently, it will be put back to the end of the wait
queue. Depending on the timing when the later sending threads wake up,
they may not be able to send any packet and be again put back to the end
of the wait queue sequentially, right behind the first sending thread.
This starvation cycle continues until some sending threads exceed their
retry limit and consequently fail.

This patch fixes the issue by two simple approaches:
(1) Any starved sending thread will be put to the head of the wait queue
while a served sending thread will be put to the tail;
(2) The most starved sending thread will be served first.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-07-31 15:17:54 -04:00
..
affinity.c IB/hfi1: Replace deprecated pci functions with new API 2017-06-27 16:58:11 -04:00
affinity.h IB/hfi1: Name function prototype parameters for affinity module 2017-06-27 16:56:33 -04:00
aspm.h IB/hfi1: Virtual Network Interface Controller (VNIC) HW support 2017-04-20 15:19:35 -04:00
chip_registers.h RDMA/hfi1: Defer setting VL15 credits to link-up interrupt 2017-06-01 17:04:20 -04:00
chip.c IB/hfi1: Fix bar0 mapping to use write combining 2017-07-31 15:17:54 -04:00
chip.h IB/hfi1: Fix bar0 mapping to use write combining 2017-07-31 15:17:54 -04:00
common.h IB/hfi1: Setup common IB fields in hfi1_packet struct 2017-06-27 16:56:33 -04:00
debugfs.c IB/hfi1: Virtual Network Interface Controller (VNIC) HW support 2017-04-20 15:19:35 -04:00
debugfs.h IB/hfi1: Add transmit fault injection feature 2017-04-05 14:45:09 -04:00
device.c infiniband: utilize the new cdev_set_parent function 2017-03-21 06:44:33 +01:00
device.h
driver.c IB/hfi1: Fix bar0 mapping to use write combining 2017-07-31 15:17:54 -04:00
efivar.c IB/hfi1: Check upper-case EFI variables 2017-02-19 09:18:37 -05:00
efivar.h
eprom.c IB/hfi1: Handle missing magic values in config file 2017-06-27 16:58:13 -04:00
eprom.h IB/hfi1: Add ability to read platform config from the EPROM 2016-10-02 08:42:20 -04:00
exp_rcv.c IB/hfi1: Initialize TID lists to avoid crash on cleanup 2017-06-27 16:58:13 -04:00
exp_rcv.h IB/hfi1: Fix bar0 mapping to use write combining 2017-07-31 15:17:54 -04:00
file_ops.c IB/hfi1: Fix bar0 mapping to use write combining 2017-07-31 15:17:54 -04:00
firmware.c IB/hfi1: Add a patch value to the firmware version string 2017-04-05 14:45:09 -04:00
hfi.h IB/hfi1: Fix bar0 mapping to use write combining 2017-07-31 15:17:54 -04:00
init.c IB/hfi1: Resolve kernel panics by reference counting receive contexts 2017-06-27 16:58:13 -04:00
intr.c RDMA/hfi1: Defer setting VL15 credits to link-up interrupt 2017-06-01 17:04:20 -04:00
iowait.h IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
Kconfig Second round of merge items for 4.8 2016-08-04 20:26:31 -04:00
mad.c IB/hfi1,qib: Do not send QKey trap for UD qps 2017-06-27 16:58:12 -04:00
mad.h IB/core,rdmavt,hfi1,opa-vnic: Send OPA cap_mask3 in trap 2017-06-27 16:58:12 -04:00
Makefile IB/hfi1: Create common expected receive verbs/PSM code 2017-06-27 16:58:13 -04:00
mmu_rb.c IB/hfi1: Don't remove RB entry when not needed. 2017-06-27 16:56:33 -04:00
mmu_rb.h IB/hfi1: Don't remove RB entry when not needed. 2017-06-27 16:56:33 -04:00
opa_compat.h
pcie.c IB/hfi1: Fix bar0 mapping to use write combining 2017-07-31 15:17:54 -04:00
pio_copy.c IB/hfi1: Optimize pio_buf and send_context structs 2016-11-15 16:37:27 -05:00
pio.c IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
pio.h IB/hfi: Fix up comments in engine mapping 2017-04-25 15:24:51 -04:00
platform.c IB/hfi1: Remove reading platform configuration from EFI variable 2017-06-27 16:58:13 -04:00
platform.h IB/hfi1: Define platform_config_table_limits once 2016-12-11 15:29:42 -05:00
qp.c IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
qp.h IB/{rdmavt, qib, hfi1}: Remove gfp flags argument 2017-07-17 21:21:23 -04:00
qsfp.c IB/hfi1: Extend i2c timeout 2016-10-02 08:42:13 -04:00
qsfp.h IB/hfi1: Fetch monitor values on-demand for CableInfo query 2016-08-22 14:31:41 -04:00
rc.c IB/hfi1: Setup common IB fields in hfi1_packet struct 2017-06-27 16:56:33 -04:00
ruc.c IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
sdma_txreq.h
sdma.c IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
sdma.h IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
sysfs.c RDMA/hfi1: fix array termination by appending NULL to attr array 2017-06-01 17:03:19 -04:00
trace_ctxts.h IB/hfi1: Clean up context initialization 2017-05-04 19:31:46 -04:00
trace_dbg.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_ibhdrs.h IB/hfi1: Separate input/output header tracing 2017-06-27 16:56:33 -04:00
trace_misc.h IB/hfi1: Add traces for TID operations 2017-06-27 16:58:13 -04:00
trace_rc.h IB/rdmavt, IB/hfi1: Fix timer migration regressions 2017-04-05 14:45:09 -04:00
trace_rx.h IB/hfi1: Add traces for TID operations 2017-06-27 16:58:13 -04:00
trace_tx.h IB/hfi1: Fix yield logic in send engine 2017-05-04 19:31:46 -04:00
trace.c IB/hfi1: Separate input/output header tracing 2017-06-27 16:56:33 -04:00
trace.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
uc.c IB/hfi1: Setup common IB fields in hfi1_packet struct 2017-06-27 16:56:33 -04:00
ud.c IB/hfi1,qib: Do not send QKey trap for UD qps 2017-06-27 16:58:12 -04:00
user_exp_rcv.c IB/hfi1: Fix bar0 mapping to use write combining 2017-07-31 15:17:54 -04:00
user_exp_rcv.h IB/hfi1: Create common expected receive verbs/PSM code 2017-06-27 16:58:13 -04:00
user_pages.c IB/hfi1: Virtual Network Interface Controller (VNIC) HW support 2017-04-20 15:19:35 -04:00
user_sdma.c IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
user_sdma.h IB/hfi1: Fix an assign/ordering issue with shared context IDs 2017-05-04 19:31:46 -04:00
verbs_txreq.c IB/hfi1: Add unique txwait_lock for txreq events 2016-11-15 16:25:59 -05:00
verbs_txreq.h IB/hfi1: Remove dependence on qp->s_cur_size 2016-12-11 15:25:13 -05:00
verbs.c IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
verbs.h IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
vnic_main.c Merge branch 'hfi1' into k.o/for-4.14 2017-07-24 08:33:43 -04:00
vnic_sdma.c IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
vnic.h IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00