linux/drivers/infiniband/hw
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
..
bnxt_re RDMA/bnxt_re: Allow posting when QPs are in error 2017-07-24 08:45:12 -04:00
cxgb3 RDMA: Remove useless MODULE_VERSION 2017-07-24 08:45:11 -04:00
cxgb4 RDMA: Remove useless MODULE_VERSION 2017-07-24 08:45:11 -04:00
hfi1 IB/hfi1: Serve the most starved iowait entry first 2017-07-31 15:17:54 -04:00
hns IB/hns: include linux/interrupt.h 2017-07-31 14:44:47 -04:00
i40iw RDMA: Remove useless MODULE_VERSION 2017-07-24 08:45:11 -04:00
mlx4 Merge branch 'misc' into k.o/for-next 2017-07-27 09:00:38 -04:00
mlx5 Merge branch 'misc' into k.o/for-next 2017-07-27 09:00:38 -04:00
mthca RDMA: Remove useless MODULE_VERSION 2017-07-24 08:45:11 -04:00
nes RDMA: Remove useless MODULE_VERSION 2017-07-24 08:45:11 -04:00
ocrdma RDMA: Remove useless MODULE_VERSION 2017-07-24 08:45:11 -04:00
qedr RDMA/qedr: notify user application of supported WIDs 2017-07-27 08:59:52 -04:00
qib Merge branch 'misc' into k.o/for-next 2017-07-27 09:00:38 -04:00
usnic RDMA: Remove useless MODULE_VERSION 2017-07-24 08:45:11 -04:00
vmw_pvrdma RDMA: Remove useless MODULE_VERSION 2017-07-24 08:45:11 -04:00
Makefile RDMA/bnxt_re: Add bnxt_re driver build support 2017-02-14 09:51:28 -05:00