IB/srp: Fix completion vector assignment algorithm

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: d92c0da71a ("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>
This commit is contained in:
Bart Van Assche 2018-02-12 09:50:25 -08:00 committed by Jason Gunthorpe
parent 71591d1280
commit 3a148896b2
1 changed files with 4 additions and 6 deletions

View File

@ -3871,12 +3871,10 @@ static ssize_t srp_create_target(struct device *dev,
num_online_nodes());
const int ch_end = ((node_idx + 1) * target->ch_count /
num_online_nodes());
const int cv_start = (node_idx * ibdev->num_comp_vectors /
num_online_nodes() + target->comp_vector)
% ibdev->num_comp_vectors;
const int cv_end = ((node_idx + 1) * ibdev->num_comp_vectors /
num_online_nodes() + target->comp_vector)
% ibdev->num_comp_vectors;
const int cv_start = node_idx * ibdev->num_comp_vectors /
num_online_nodes();
const int cv_end = (node_idx + 1) * ibdev->num_comp_vectors /
num_online_nodes();
int cpu_idx = 0;
for_each_online_cpu(cpu) {