Received: by 10.192.165.148 with SMTP id m20csp2487509imm; Sun, 22 Apr 2018 08:03:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx48d5wDTS44oIFywm0xPcCcgceGiQ+3kZ3LD9c7FuPdxs5s36/FBbXNBvGquwpBLapspSWft X-Received: by 10.99.95.13 with SMTP id t13mr14694577pgb.145.1524409419239; Sun, 22 Apr 2018 08:03:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524409419; cv=none; d=google.com; s=arc-20160816; b=Na87beZmisO7Kt7O+fXqOUyeH9MZAH5mLdIVijL2JTvQyYEW1Exx+8b3BKRphl1oqI nUipkpjyFtwS/VPRS8S1hLJ6+UeDWisQ9XdZtY3soDTlkVa7N+iyq8cGy+KPHhTymP4b cE1D879XU/yHpr0C+TEYZNBefJKoac/dXtAhfs5i4zTvCDOwCUpiDSyM7TwUuRVz5Elf dRx+x3D009GJoVRDeWQh79E6rvJhNAosvGzKLbXk+97jqLjphetB+BGrFnZALQjCZTGf rIT9+IbypVKqAc6AlmfpoP6N7vpCfbw6Q1KtRMoAinySpRFuYvlu4etfhPKODxn2TZHs +lJg== 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=bKFxRsXAEZKhsb/1beodyr7gU3nbFczr36mGjNiBk9c=; b=feaUNvoae7XHIEz5J8JVrZ8cvp203F4jCOLNOgJ2CAEg586wbFtY9jADSetEJlgIiL Ye4MAMQ+iEf+Tp1FwTFx/KARjuNSL74R9aq2hhbF4Oe1g2HUnITMy7ISZcx1Jy0BKPZN 3hw1y7GfDL5jSxgSq0DdqX5IUHIJwt2Nrrlu3Hrz5leQEKsmewnqPmxWHlDCfjDfaV9+ UnPcc/5g38JrGvLtFS7cLlv2rxufU7yefm8Q5aOQl9ViScjl+lZ5/0KMh7t9qAugvsFm 7p5vO9LZaEsnqqXpvNcJ7Oxuj2ZwUNq8eyowpq2tjniqQgaJFOjPZ8zFbhWyDpZDJ0EQ G5jQ== 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 f1-v6si9680455pld.168.2018.04.22.08.03.25; Sun, 22 Apr 2018 08:03:39 -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 S1754544AbeDVPBQ (ORCPT + 99 others); Sun, 22 Apr 2018 11:01:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55212 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756232AbeDVOMn (ORCPT ); Sun, 22 Apr 2018 10:12:43 -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 8FAD0CCE; Sun, 22 Apr 2018 14:12:41 +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.9 43/95] IB/srp: Fix completion vector assignment algorithm Date: Sun, 22 Apr 2018 15:53:12 +0200 Message-Id: <20180422135212.179983678@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135210.432103639@linuxfoundation.org> References: <20180422135210.432103639@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.9-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 @@ -3397,12 +3397,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) {