Received: by 10.192.165.148 with SMTP id m20csp2470402imm; Sun, 22 Apr 2018 07:43:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+g224tFW+ceVaf590hOK9NC3Z230xEznnkXl96i6f65Nn32NGVL1leY01loSyE+m44x92Y X-Received: by 2002:a17:902:7d86:: with SMTP id a6-v6mr18048571plm.264.1524408197161; Sun, 22 Apr 2018 07:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524408197; cv=none; d=google.com; s=arc-20160816; b=AJvZhnkRTAwB8WMr8v8TA/MtMId09trhk5waBew55istXLlmRskGH5oblVoKJqgo7L yBBPSNtFcpAOlukdThyzcR54xt4TgWRnJD4NluzyroHvzvRxTdOj9voaKkQvj08/C4fJ Jg1S/ijcFnPlzBSgonXDEz7DJUjYvDDYbuC1XOCa1oEVabV6Z6C8/iMK3QuJ/2NAOhLy 6lX175fChzG49byXPq+b838V2tuji7qO6XYaZZowifw565D7KNxPCumRpx3NtOCpNE/9 lZfNwXenUPNiV3w1QfXZmDsPwtCwqYrFGiEu7K7P9vqqrsgjXHNt3/EplMlZCmGw8zST HIww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=9bQR1odaMQ/SRU2bzBERgf284pcQJXNkiy56f3PK/ug=; b=cQlcDXiUtfC5xcDcMVoZatd+/QQodrsPhWTNp8WJ50VpcxeQN13TTRfnG72aUUQgr1 KqCjEJFXfGrWdyGImTcUBf6Ky2m5hItM73DKBYAJ0Ic8Jb/m1owhbNWwQ8doXsXifAXM nNq28h+cqgoX2XSt5Ce9/+FYiInLXBwpGTo/plKIajwhY5zIOfVL9kQDIfI1eif31yR6 TDMike5osBI3VoV9vip8gZMTJQpaDts5EnohwpkKdDkkcnuYVtFRfUnxsByqn2Ba8gkE G8Y5bm1SYy2NPmE37VpNNk4ybICuLg85Q8Z0VbOq8QWbSRiYkk5hvNdWCNg0QKZTKUwB 2qjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si3012562pgp.119.2018.04.22.07.43.03; Sun, 22 Apr 2018 07:43:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932421AbeDVOmF (ORCPT + 99 others); Sun, 22 Apr 2018 10:42:05 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58446 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932252AbeDVORg (ORCPT ); Sun, 22 Apr 2018 10:17:36 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B489ACD2; Sun, 22 Apr 2018 14:17:35 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alexander Schmid , Bart Van Assche , Jason Gunthorpe Subject: [PATCH 4.4 55/97] IB/srp: Fix completion vector assignment algorithm Date: Sun, 22 Apr 2018 15:53:33 +0200 Message-Id: <20180422135308.352834384@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135304.577223025@linuxfoundation.org> References: <20180422135304.577223025@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bart Van Assche commit 3a148896b24adf8688dc0c59af54531931677a40 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: d92c0da71a35 ("IB/srp: Add multichannel support") Reported-by: Alexander Schmid Signed-off-by: Bart Van Assche Cc: Alexander Schmid Cc: stable@vger.kernel.org Signed-off-by: Jason Gunthorpe Signed-off-by: Greg Kroah-Hartman --- drivers/infiniband/ulp/srp/ib_srp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -3311,12 +3311,10 @@ static ssize_t srp_create_target(struct 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) {