Received: by 10.192.165.148 with SMTP id m20csp2529685imm; Sun, 22 Apr 2018 08:57:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx484BwiTM8pcaBdhsvOPnkK+HXGDsA89X2b4THmvHsUGpj8Rse2ZlPwByfASAoOopJ0sIXtE X-Received: by 2002:a17:902:7185:: with SMTP id b5-v6mr17478193pll.221.1524412678258; Sun, 22 Apr 2018 08:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524412678; cv=none; d=google.com; s=arc-20160816; b=WzBcb8bIBfdv5gg5sqSc2Dxm+snK4UnsO6l8eG3QVMemSKV1fsjEdsJtpF2Kf646wE sDfjFs4qv9ykxPaouAo0sgOX5G4YXdmZuK2o0gqg/k3Zw91R5RfF9+WFzCOCbZbr5kxm kt1fiOdoS8/K2rGOo0scwoB6d5xtuTmJMqM3eWEwSR9CQQyvp2m1Q1JAlyoGQ5WcKsMR RyZooUfDobBPNSkn0+tGkiWIz8S9qmJUXkHBxMpZHbLwu9fK8HNUVmmxPrJWQk5IzQZg R7WKdqxi29zAoLd7GzyIGpwdfEbDBE2NMgqM8QAFOF7b4bVPMzqwVOff2EXy9TSNrL3q wOGA== 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=U2TE7vz3kBaIkW7ihG5DMuld09Sg/YgUxa4IbtjtANI=; b=wq+i2IyF+8jexVVI5/3DfOSb54/mZqDFkrCpiDCKbfODPJtnZVQXuOPKsIiVUPaino 06dM3149+1nWxXbtKmcL53SMYJ0W8wXu6KxARjc+xoCeE9MZqNgjYJZJPW80uSxyuhiU bYpX9eTvgEFzJ18WptX/WJXmp8vhZXnQGFmHXn99n5m4rzIQIIX1URa7JkxFX+WHq4bD 9n1J5F9yDAYpKPMrDLQ5ZRHiMhN8GlOAFTl/FI6uRHVtU3BGM2h7gpElD072epnPQUSy iPzmu5/ZPmsiobgk/2pnPD3tvd5Q44S4vg0ePa1+UNvNNPrDbWkPb1kKmw74D1dwXmAM co5Q== 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 q26si7958397pgv.585.2018.04.22.08.57.44; Sun, 22 Apr 2018 08:57:58 -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 S1754652AbeDVP4i (ORCPT + 99 others); Sun, 22 Apr 2018 11:56:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46892 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754289AbeDVN73 (ORCPT ); Sun, 22 Apr 2018 09:59:29 -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 16EC99C; Sun, 22 Apr 2018 13:59:28 +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.16 114/196] IB/srp: Fix completion vector assignment algorithm Date: Sun, 22 Apr 2018 15:52:14 +0200 Message-Id: <20180422135110.157517256@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@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.16-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 @@ -3873,12 +3873,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) {