Skip to content

Commit e99ca1e

Browse files
KAGA-KOKOgregkh
authored andcommitted
IB/srp: Fix completion vector assignment algorithm
commit 3a14889 upstream. Ensure that cv_end is equal to ibdev->num_comp_vectors for the NUMA node with the highest index. This patch improves spreading of RDMA channels over completion vectors and thereby improves performance, especially on systems with only a single NUMA node. This patch drops support for the comp_vector login parameter by ignoring the value of that parameter since I have not found a good way to combine support for that parameter and automatic spreading of RDMA channels over completion vectors. Fixes: d92c0da ("IB/srp: Add multichannel support") Reported-by: Alexander Schmid <alex@modula-shop-systems.de> Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Alexander Schmid <alex@modula-shop-systems.de> Cc: stable@vger.kernel.org Signed-off-by: Jason Gunthorpe <jgg@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fe71b03 commit e99ca1e

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎drivers/infiniband/ulp/srp/ib_srp.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3430,12 +3430,10 @@ static ssize_t srp_create_target(struct device *dev,
34303430
num_online_nodes());
34313431
const int ch_end = ((node_idx + 1) * target->ch_count /
34323432
num_online_nodes());
3433-
const int cv_start = (node_idx * ibdev->num_comp_vectors /
3434-
num_online_nodes() + target->comp_vector)
3435-
% ibdev->num_comp_vectors;
3436-
const int cv_end = ((node_idx + 1) * ibdev->num_comp_vectors /
3437-
num_online_nodes() + target->comp_vector)
3438-
% ibdev->num_comp_vectors;
3433+
const int cv_start = node_idx * ibdev->num_comp_vectors /
3434+
num_online_nodes();
3435+
const int cv_end = (node_idx + 1) * ibdev->num_comp_vectors /
3436+
num_online_nodes();
34393437
int cpu_idx = 0;
34403438

34413439
for_each_online_cpu(cpu) {

0 commit comments

Comments
 (0)