Commit e99ca1ee authored by Bart Van Assche's avatar Bart Van Assche Committed by Greg Kroah-Hartman

IB/srp: Fix completion vector assignment algorithm

commit 3a148896 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: d92c0da7 ("IB/srp: Add multichannel support")
Reported-by: default avatarAlexander Schmid <alex@modula-shop-systems.de>
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Cc: Alexander Schmid <alex@modula-shop-systems.de>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe71b03e
......@@ -3430,12 +3430,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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment