Received: by 10.192.165.156 with SMTP id m28csp255244imm; Tue, 17 Apr 2018 09:35:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/NrHzMRcXTyBb8YvFQrtIinHOYjknmIqJT6IW0ycye1k7g4W9no/lVH3ZxyT7GfzBjl43U X-Received: by 10.101.100.74 with SMTP id s10mr2315988pgv.407.1523982948463; Tue, 17 Apr 2018 09:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523982948; cv=none; d=google.com; s=arc-20160816; b=hDSFf5+ksmdemFI57vReY/5LUWmoWhSPBToqBF+o5uJox/N8uxb4DVa/uoyOYXVTWR kr8pjeLJmJKEZW8AYe15c6CS5FHDtPk+cbr0qU51yHqSDx4yU/UotqrttluzToS2W0Ne VS/XZydRhumGjlDa7NFigtfh4L2y6nH5Jfg82gzkaQaK6cUw90loUy3fAepiVFeO18sz rN9iI+F8s0v4u7KaF49Pk9e87ViHkM+i/Mxl9umgIg5Gmg/cgI2v2WorKECHnzhEL9H0 oal0zgyf152VQdLqrMbIPBRkoPtuX8S278jfbVm/Rb5DlmtgUjU4wQ51TPyTnGDliNIQ Hivw== 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=UjXN6V6euj5s/y6jwP1V8/odKnprgcocPi+WMC6xceY=; b=qPYaOHnTRr/X++0ba4uGCsq30fql4pAHba+8r4elWeutiTksCOmu3lfF6UiyQshq/G JsdhTv+t6qAuyBK7PCpzkLhSSm63iEDhLnXooOr3Ikz6EiEjsrcFu2s+oDHWuf5GIkUK 97kqWNDi6eMk51dF2k9jZ+PzOEPhYG8GEA1yQpfHWXOLY/pCd8wDB+luimUA7c5HrgfK gl+gTuSx88xzfzCp5mLY5kWnQ7Qzf/6040+v3D43C1e9ZnkWj+JB0kNLMAEDo6cX0eRE 3/bnzp9Gy0YfWk2otF8fQqzuKM1mLFSahQtJ02LfFgLAQ1FL+6u0QYhTEEjP0fzPx7AM ZJRQ== 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 r63-v6si2107196plb.366.2018.04.17.09.35.34; Tue, 17 Apr 2018 09:35:48 -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 S1754433AbeDQQeX (ORCPT + 99 others); Tue, 17 Apr 2018 12:34:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35144 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755194AbeDQQH1 (ORCPT ); Tue, 17 Apr 2018 12:07:27 -0400 Received: from localhost (unknown [46.44.180.42]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CAF1CE58; Tue, 17 Apr 2018 16:07:26 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Haberland , Keith Busch , Christian Borntraeger , Christoph Hellwig , Sagi Grimberg , Ming Lei , Jens Axboe Subject: [PATCH 4.14 45/49] blk-mq: dont keep offline CPUs mapped to hctx 0 Date: Tue, 17 Apr 2018 17:59:24 +0200 Message-Id: <20180417155717.187039680@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417155715.032245882@linuxfoundation.org> References: <20180417155715.032245882@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 commit bffa9909a6b48d8ca3398dec601bc9162a4020c4 upstream. >From commit 4b855ad37194 ("blk-mq: Create hctx for each present CPU), blk-mq doesn't remap queue after CPU topo is changed, that said when some of these offline CPUs become online, they are still mapped to hctx 0, then hctx 0 may become the bottleneck of IO dispatch and completion. This patch sets up the mapping from the beginning, and aligns to queue mapping for PCI device (blk_mq_pci_map_queues()). Cc: Stefan Haberland Cc: Keith Busch Cc: stable@vger.kernel.org Fixes: 4b855ad37194 ("blk-mq: Create hctx for each present CPU) Tested-by: Christian Borntraeger Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Ming Lei Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/blk-mq-cpumap.c | 5 ----- 1 file changed, 5 deletions(-) --- a/block/blk-mq-cpumap.c +++ b/block/blk-mq-cpumap.c @@ -16,11 +16,6 @@ static int cpu_to_queue_index(unsigned int nr_queues, const int cpu) { - /* - * Non present CPU will be mapped to queue index 0. - */ - if (!cpu_present(cpu)) - return 0; return cpu % nr_queues; }