Received: by 10.192.165.156 with SMTP id m28csp269493imm; Tue, 17 Apr 2018 09:51:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ogNTswYJc6TfodKvvDXy770mPEganmDnMzQmc6e1KUqJIVuy1HRzlP5cs9fhUMe+2Ftig X-Received: by 10.98.0.15 with SMTP id 15mr2650874pfa.72.1523983903461; Tue, 17 Apr 2018 09:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523983903; cv=none; d=google.com; s=arc-20160816; b=uD/Sj4aZIL1uAbjuNiWrRwIJjt77bGS0u/jE0ODbvI2ahK8gnEoaA+VLNF5ktfq/4T WDg+F9MOVonfxHgbbLSmC7v1Gajhmu6/1OTljSPr0j3522fN/gXAJ7qVlF6vZjmqjVhx 2TZjoz1hk3N1hClZpa+Ek3hRQ+eqvZngKK6Ze/2sroYZiDKPeICDzeQnhCoi6aHNYA6e QEFxAfP6d2yj1FE4ByvsF+ki0V5tUgjQcVHoptLgtvOxGrDaU95UxakM72wl0fAPzYdX yl4fkAboFHZTEY7PSC1uLhyGoXwJNZ6XfYxPoWRA6JxSd1y+FKaVaYtcHTV+/iTpyEJL D3zQ== 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=R4p7u+dbD63NmP/nXk0DdduDRZ9cgbIVHSmykSxKTqc=; b=rihosXwkavstTVrj2QJZH0BbxExFlGIJFO9EvaY0XPp+yXECWz8R2FGVv8Z+c/agw8 mp6QnYWJoUj3d4hcjsgWUBNEFwWH/rjfWGJaesg4l7pcoVMltmdyCeHKPiNTB1bf3bh8 05VwNuqlAIJkf6Kk8Z5Sj+YUsKeYaHtSje+SbtWhQLXlQlt9/0T067BDIjG2QlIasK1q OSZEKu9iFYGxT8dvDV5FQfcSujI9S2FkJvg+dWJ8dibpBvTclaOroEBdTb+RrVz1u/Gl tWJ+UOhMs59h5Fj1QiLP4dgxDZeeu9kxkgj+/7S77oBeZAl3RWHLIWar8bOZIu9az8En BuKw== 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 j21si13220311pfe.132.2018.04.17.09.51.29; Tue, 17 Apr 2018 09:51:43 -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 S1754564AbeDQQEo (ORCPT + 99 others); Tue, 17 Apr 2018 12:04:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34212 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754495AbeDQQEh (ORCPT ); Tue, 17 Apr 2018 12:04:37 -0400 Received: from localhost (unknown [46.44.180.42]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id DCDEABBE; Tue, 17 Apr 2018 16:04:19 +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.15 32/53] blk-mq: dont keep offline CPUs mapped to hctx 0 Date: Tue, 17 Apr 2018 17:58:57 +0200 Message-Id: <20180417155724.713605978@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417155723.091120060@linuxfoundation.org> References: <20180417155723.091120060@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.15-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; }