Skip to content

Commit d92c0da

Browse files
bvanasscheChristoph Hellwig
authored andcommitted
IB/srp: Add multichannel support
Improve performance by using multiple RDMA/RC channels per SCSI host for communication with an SRP target. About the implementation: - Introduce a loop over all channels in the code that uses target->ch. - Set the SRP_MULTICHAN_MULTI flag during login for the creation of the second and subsequent channels. - RDMA completion vectors are chosen such that RDMA completion interrupts are handled by the CPU socket that submitted the I/O request. As one can see in this patch it has been assumed if a system contains n CPU sockets and m RDMA completion vectors have been assigned to an RDMA HCA that IRQ affinity has been configured such that completion vectors [i*m/n..(i+1)*m/n) are bound to CPU socket i with 0 <= i < n. - Modify srp_free_ch_ib() and srp_free_req_data() such that it becomes safe to invoke these functions after the corresponding allocation function failed. - Add a ch_count sysfs attribute per target port. Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 77f2c1a commit d92c0da

File tree

3 files changed

+235
-81
lines changed

3 files changed

+235
-81
lines changed

Documentation/ABI/stable/sysfs-driver-ib_srp

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ Description: Interface for making ib_srp connect to a new target.
5555
only safe with partial memory descriptor list support enabled
5656
(allow_ext_sg=1).
5757
* comp_vector, a number in the range 0..n-1 specifying the
58-
MSI-X completion vector. Some HCA's allocate multiple (n)
59-
MSI-X vectors per HCA port. If the IRQ affinity masks of
60-
these interrupts have been configured such that each MSI-X
61-
interrupt is handled by a different CPU then the comp_vector
62-
parameter can be used to spread the SRP completion workload
63-
over multiple CPU's.
58+
MSI-X completion vector of the first RDMA channel. Some
59+
HCA's allocate multiple (n) MSI-X vectors per HCA port. If
60+
the IRQ affinity masks of these interrupts have been
61+
configured such that each MSI-X interrupt is handled by a
62+
different CPU then the comp_vector parameter can be used to
63+
spread the SRP completion workload over multiple CPU's.
6464
* tl_retry_count, a number in the range 2..7 specifying the
6565
IB RC retry count.
6666
* queue_size, the maximum number of commands that the
@@ -88,13 +88,26 @@ Description: Whether ib_srp is allowed to include a partial memory
8888
descriptor list in an SRP_CMD when communicating with an SRP
8989
target.
9090

91+
What: /sys/class/scsi_host/host<n>/ch_count
92+
Date: April 1, 2015
93+
KernelVersion: 3.19
94+
95+
Description: Number of RDMA channels used for communication with the SRP
96+
target.
97+
9198
What: /sys/class/scsi_host/host<n>/cmd_sg_entries
9299
Date: May 19, 2011
93100
KernelVersion: 2.6.39
94101
95102
Description: Maximum number of data buffer descriptors that may be sent to
96103
the target in a single SRP_CMD request.
97104

105+
What: /sys/class/scsi_host/host<n>/comp_vector
106+
Date: September 2, 2013
107+
KernelVersion: 3.11
108+
109+
Description: Completion vector used for the first RDMA channel.
110+
98111
What: /sys/class/scsi_host/host<n>/dgid
99112
Date: June 17, 2006
100113
KernelVersion: 2.6.17

0 commit comments

Comments
 (0)