Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2337461imm; Mon, 28 May 2018 06:18:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo+WqRKz7yklhca2OXJupnXfw9YA/F/Ul+7ciKxtFXr8V/Ua0NFgt2C/jinmBoa0h3nQhVf X-Received: by 2002:a17:902:b184:: with SMTP id s4-v6mr13297249plr.359.1527513520775; Mon, 28 May 2018 06:18:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527513520; cv=none; d=google.com; s=arc-20160816; b=qul72x5RN9yNYV7tVzQdKtP/gmsNBDZmlzMz02UROCopeuiqqGoIj7+/vxVDWS3HSV wTcC70MKbYoHSSu4Ym6MRvXKZomTG+tpalEqUUVUDO9gdfpZ7hX4ukh0GNNIbvTa8V/l 48qaTWUIaGhz+XvUCmwzWQkt1QZiGAf+tmd3zlrHW1H9OhOP3RxBHKmW0XVPJvoWb2zv XVTz5hwwogO++LrShbSPST71Ff1PJP0P07hi8v28Tu2iVBl+3xeALsNU64N6nJuXP2p2 yGG4alzXpFRi9JsGR/MGJcbiuZYjvfw9EuwNp4/i6jh63WRxUWvJdoYq4xIVverMxP8D J9/Q== 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:dkim-signature :arc-authentication-results; bh=O/5whYrsZ+Wi0L3ovu2BH92sHdlGwzdX6utIBTuX7CA=; b=n8jltnN5v6rynvv3c7O5ZyuOqG8DWZ2M4s8L/+SLvxYOKhC8wAhBrMrMfIL4DMuYDR F5JV18VpjQ/FZPdoVNrBmb8BZx8AIfyBKhmGIriPa7SunnHNTCmYEHr2rg65rubCoWQp 4Ztvx/HtGtU1uXtbYulGRbo6UuJQqclQpuR9CsbfEZqNHMDvHa+SV9Qt2muCNUhmjMZ8 3tqZlo9qvV97IypAqUg98SkwLfh8lKf4O6CeIXudNhEIKdf8shkIm2ba/2D4x9bLb9DT ox+VY7aBwvxndYHaiHGLQnVU1+/WWWE67xfYlN5Gvs3+x1KDqNE51A/eh/r0jYV8ya4C koVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Z4Ps2WPs; 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 b5-v6si30766823ple.417.2018.05.28.06.18.26; Mon, 28 May 2018 06:18:40 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Z4Ps2WPs; 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 S1165274AbeE1NRt (ORCPT + 99 others); Mon, 28 May 2018 09:17:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:39572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163596AbeE1KuB (ORCPT ); Mon, 28 May 2018 06:50:01 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8E02820660; Mon, 28 May 2018 10:50:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504601; bh=LTia1QjV9y3Av/N24eEWHqpa8+rMNSH1QRo7YIEYItg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z4Ps2WPsUQ71mOdibtBeZJajLz8VH6y+noHzzMYna/KrXtaWfpxs1vKvlEMb24Gum DFyN+XFkXmg5u9vbJh58l9Pf4IUr9VZMl5CUc4ibBu9X0dx7AwsCN5SESszDYKu8tX 7KBA26Wm9XwEQBTM7g66Tq/Dd9UsrP3/DlXQAvxU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Keith Busch , Sagi Grimberg , Thomas Gleixner , Christoph Hellwig , Ming Lei , Sasha Levin Subject: [PATCH 4.14 197/496] nvme: pci: pass max vectors as num_possible_cpus() to pci_alloc_irq_vectors Date: Mon, 28 May 2018 11:59:42 +0200 Message-Id: <20180528100328.228187488@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ming Lei [ Upstream commit 16ccfff2897613007b5eda9e29d65303c6280026 ] 84676c1f21 ("genirq/affinity: assign vectors to all possible CPUs") has switched to do irq vectors spread among all possible CPUs, so pass num_possible_cpus() as max vecotrs to be assigned. For example, in a 8 cores system, 0~3 online, 4~8 offline/not present, see 'lscpu': [ming@box]$lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 2 NUMA node(s): 2 ... NUMA node0 CPU(s): 0-3 NUMA node1 CPU(s): ... 1) before this patch, follows the allocated vectors and their affinity: irq 47, cpu list 0,4 irq 48, cpu list 1,6 irq 49, cpu list 2,5 irq 50, cpu list 3,7 2) after this patch, follows the allocated vectors and their affinity: irq 43, cpu list 0 irq 44, cpu list 1 irq 45, cpu list 2 irq 46, cpu list 3 irq 47, cpu list 4 irq 48, cpu list 6 irq 49, cpu list 5 irq 50, cpu list 7 Cc: Keith Busch Cc: Sagi Grimberg Cc: Thomas Gleixner Cc: Christoph Hellwig Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1770,7 +1770,7 @@ static int nvme_setup_io_queues(struct n int result, nr_io_queues; unsigned long size; - nr_io_queues = num_present_cpus(); + nr_io_queues = num_possible_cpus(); result = nvme_set_queue_count(&dev->ctrl, &nr_io_queues); if (result < 0) return result;